Python初心者です。
先物の自動売買ツールの作成に挑戦しています。
Python Pandas read Excelの書き方をご教示ください。
内容としては、先物の価格データが入力されているエクセルファイルの(i,3) i=2 から列の最後尾までのデータを取得したいです。
ファイル形式はExcelが好ましいです。
Pandasを使用としているのですが,下記のエラーが出て、良くわかりません。
実際に動くソースをご教示いただけますと凄く嬉しいです。
宜しくお願い致します。
inputprice = int(pd.read_excel(xlsFile, sheetname = sheetName, parse_cols=3, skiprows = i, skip_footer=20000))
/anaconda3/lib/python3.6/site-packages/pandas/util/_decorators.py:118: FutureWarning: The sheetname
keyword is deprecated, use sheet_name
instead
return func(*args, **kwargs)
Traceback (most recent call last):
File "gajumaru2.py", line 404, in <module>
main()
File "gajumaru2.py", line 341, in main
inputprice = int(pd.read_excel(xlsFile, sheetname = sheetName, parse_cols=3, skiprows = i, skip_footer=20000))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'DataFrame'
Python
1 xlsFile = 'N225minif_2017.xlsx' 2 sheetName = '10min' 3 4 i = 2 5 for i in range(i, 20000): 6 lastprice = curprice 7 8 inputprice = int(pd.read_excel(xlsFile, sheetname = sheetName, parse_cols=3, skiprows = i, skip_footer=20000))

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/28 23:40
2018/04/28 23:43
2018/04/28 23:46
2018/04/29 00:41
2018/05/04 05:22