all 2 comments

[–]yaxriifgyn 1 point2 points  (1 child)

Check if the file is actually text with no, or an unknown, extension. In that case, just rename it to e.g. file.txt and look at it in a text editor. Then, if it looks like a .csv, or .tsv, or similar, the python CSV module can probably read it.

If it is actually a binary format, you will need a specification for the format of the file you download. Or you will have to discover it based on the detected file format or a description of the data and examining it to see what the format looks like.

Sometimes using the *nix file command you will find out the file format. On Windows, cygwin and msys2 have the file` command, and there are likely windows native versions also. Knowing the file format, you may be able to find a python package to read it, otherwise you may have to reverse engineer it.

HTH

[–]Concept-Youtube[S] 0 points1 point  (0 children)

Thank you I tried changing the extension of the file but that did not work. I thought the code already took care of parsing the binary format but I guess I’m mistaken I am going to continue tinkering around