Created
September 18, 2020 08:41
-
-
Save kzinmr/ff2d2ce212cb4e51baf8eeba7026b4bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def jpx_companies(): | |
url = 'https://www.jpx.co.jp/markets/statistics-equities/misc/tvdivq0000001vg2-att/data_j.xls' | |
df = pd.read_excel(url) | |
# print(df.shape, df.columns) | |
excludes = {'ETF・ETN', 'REIT・ベンチャーファンド・カントリーファンド・インフラファンド'} | |
df_companies = df.loc[~df['市場・商品区分'].isin(excludes)] | |
# companies_set = {c for c, df_ in df_companies.set_index('銘柄名').groupby(level=0)} | |
return df_companies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment