次のタグが付いている新しい回答: python-requests
1
こちらの記事を応用してStringIOにDataFrameをto_csv()すれば出来ると思われます。
Writing A Pandas DataFrame To A Disk File Or A Buffer
Example - To write a pandas DataFrame into a text buffer:
This Python example passes an instance of a text stream like StringIO() to write the DataFrame as a CSV into the in-memory text buffer.
from io import StringIO
textStream = StringIO();
y3....
0
ここです!!
file=request.files['input_files']
ここを削除すれば動くはずです!せっかくすでに
file = request.files['file']
で正しいファイルを取得しているにもかかわらず存在していないキー名で再取得しようとしているのが原因でした。
以下追加で直したほうがよいところ
HTML の要素名は「"(ダブルクォーテーション)」で囲まなければいけません。なので
<form method="post" enctype="multipart/form-data">
と書きましょう。
Python 内で使っている file という変数名は一般的すぎるのでもう少し説明的な名前がよいでしょう。また、...
上位 50 件の最近の回答が含まれています
関連するタグ
python-requests × 19python × 18
python3 × 11
selenium × 3
flask × 3
beautifulsoup × 3
非同期 × 3
web-scraping × 2
ruby-on-rails × 1
ruby × 1
html × 1
google-chrome × 1
google-api × 1
cookie × 1
curl × 1
google-colaboratory × 1
anaconda3 × 1
slack × 1