Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Pandas is not working when trying read excel or csv files from box

New post

Comments

5 comments

  • Lynn, Matt

    I believe I have a similar problem here. Is the raw file in box pathable outside of box, i.e. can it be referenced?

    0
    Comment actions Permalink
  • George Avetisyan

    Yes it definitely can :
    1) url shared link (which will go derectly to the file and will give you file open the link will contain boxdomain/file/file_id + bunch of characters associated with the fike

    2) second option will NOT open the file . You can reference as boxdomain/folder/folderid . If you do that way , it will simply direct you to the folder where the file resides.
    Out of these 2 ways, the first one I think is what you was asking right ?

    0
    Comment actions Permalink
  • Lynn, Matt

    The shared link does send you to the file location, but it isn't the raw file. The pic below is an example of a shared link from box. However, if you use this link to a gist you can access the raw file in the browser, which will send you to this page Effectively, you can path to this raw file. I see now way of accessing the raw file from box. I've made a post about it, so hopefully it can get answered to some degree. Ideally, we need the boxdomain/file/file_id + token/file.csv I believe that is why you are getting None types in your pandas read function, because the raw file isn't actually being read, i.e. there is nothing there as far as a csv/excel file goes.

    0
    Comment actions Permalink
  • George Avetisyan

    So basically after the token that shared url generated + name of the file ? Is that correct ?
    Url shared link + file name

    0
    Comment actions Permalink
  • Lynn, Matt

    The problem is if you add a /filename to the url it doesn't take you to the raw file. However, the raw file is parsed in their js scripts. You can inspect the page and see papa parse and stuff being jqueried. So the raw file is somewhere, but we as users don't have an obvious way of accessing it for references or inputs for functions as you are doing. 

    0
    Comment actions Permalink

Please sign in to leave a comment.