Read box files in python

新規投稿

コメント

4件のコメント

  • Nayak

    Hi , I stongly recommend you to use the Box Python SDK and authenticate (either via JWT approach or 3 legged Oauth2) and get the access token & client connection setup. Post this you can call the List Folder Items & download required files. Hope this helps

    0
    コメントアクション パーマリンク
  • George Avetisyan

    Hey, Nayak. I did try everything you just mentioned above, pandas is not able to read excel files. In fact its not reading any files. When I do pd.read_excel () in the parameter I tried to pass content, link to the file, file id, everything. Its not working. Please let me know what is the problem

    0
    コメントアクション パーマリンク
  • Guy Huinen

     

    from io import StringIO
    import pandas as pd

    file_content = client.file(file_id).content()

    s=str(file_content,'utf-8')

    data = StringIO(s)

    df=pd.read_csv(data)

    0
    コメントアクション パーマリンク
  • Shobin Joyakin

    Hi George.. Did you find a way to read Excel file in Box using python script? The solution Guy Huinen shared works only with CSV files.

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。