code
stringlengths
3
6.57k
int(pd.Timestamp(end_date)
timestamp()
int(pd.Timestamp(start_date)
timestamp()
interval.lower()
force_float(elt)
float(elt)
_convert_to_numeric(s)
s.strip("M")
force_float(s)
s.strip("B")
force_float(s)
force_float(s)
in ("1d", "1wk", "1mo", "1m")
AssertionError("interval must be of of '1d', '1wk', '1mo', or '1m'")
build_url(ticker, start_date, end_date, interval)
requests.get(site, params = params, headers = headers)
AssertionError(resp.json()
resp.json()
pd.DataFrame(data["chart"]["result"][0]["indicators"]["quote"][0])
pd.to_datetime(temp_time, unit = "s")
frame.index.map(lambda dt: dt.floor("d")
pd.to_datetime(temp_time, unit = "s")
ticker.upper()
frame.reset_index()
frame.rename(columns = {"index": "date"}, inplace = True)
tickers_sp500(include_company_data = False)
pd.read_html("https://en.wikipedia.org/wiki/List_of_S%26P_500_companies")
str.replace(".", "-", regex=True)
sp500.Symbol.tolist()
sorted(sp_tickers)
tickers_nasdaq(include_company_data = False)
ftplib.FTP("ftp.nasdaqtrader.com")
ftp.login()
ftp.cwd("SymbolDirectory")
io.BytesIO()
ftp.retrbinary('RETR nasdaqlisted.txt', r.write)
r.seek(0)
pd.read_csv(r, sep = "|")
r.getvalue()
decode()
info.split("|")
x.split("\r\n")
ftp.close()
tickers_other(include_company_data = False)
ftplib.FTP("ftp.nasdaqtrader.com")
ftp.login()
ftp.cwd("SymbolDirectory")
io.BytesIO()
ftp.retrbinary('RETR otherlisted.txt', r.write)
r.seek(0)
pd.read_csv(r, sep = "|")
r.getvalue()
decode()
info.split("|")
x.split("\r\n")
ftp.close()
tickers_dow(include_company_data = False)
pd.read_html(site, attrs = {"id":"constituents"})
sorted(table['Symbol'].tolist()
tickers_ibovespa(include_company_data = False)
pd.read_html("https://pt.wikipedia.org/wiki/Lista_de_companhias_citadas_no_Ibovespa")
sorted(table.Symbol.tolist()
tickers_nifty50(include_company_data = False, headers = {'User-agent': 'Mozilla/5.0'})
pd.read_html(requests.get(site, headers=headers)
sorted(table['Symbol'].tolist()
tickers_niftybank()
tickers_ftse100(include_company_data = False)
pd.read_html("https://en.wikipedia.org/wiki/FTSE_100_Index", attrs = {"id": "constituents"})
sorted(table.EPIC.tolist()
tickers_ftse250(include_company_data = False)
pd.read_html("https://en.wikipedia.org/wiki/FTSE_250_Index", attrs = {"id": "constituents"})
sorted(table.Ticker.tolist()
get_quote_table(ticker , dict_result = True, headers = {'User-agent': 'Mozilla/5.0'})
pd.read_html(requests.get(site, headers=headers)
append(tables[1])
pd.DataFrame(["Quote Price", get_live_price(ticker)
transpose()
data.columns.copy()
data.append(quote_price)
data.sort_values("attribute")
data.drop_duplicates()
reset_index(drop = True)
data.value.map(force_float)
zip(data.attribute , data.value)
get_stats(ticker, headers = {'User-agent': 'Mozilla/5.0'})
pd.read_html(requests.get(stats_site, headers=headers)
table.append(elt)
table.reset_index(drop = True)
get_stats_valuation(ticker, headers = {'User-agent': 'Mozilla/5.0'})
pd.read_html(requests.get(stats_site, headers=headers)
tolist()
reset_index(drop = True)
_parse_json(url, headers = {'User-agent': 'Mozilla/5.0'})
requests.get(url=url, headers = headers)
html.split('root.App.main =')
split(';\n}')
strip()
json.loads(json_str)
json.dumps(data)