简体   繁体   中英

Strange csv output when csv file is read from a github repo using pandas on Debian OS

I have the following data on a csv file:

XG,612.0
YG,-1924.0500000000002
ZG,-959.085
A_mod,6.889112523645457
I1_mod,0.478595694542785
I2_mod,32.64258822366686

If I open it using excel or atom, everything's normal. The file is on the folder of my GitHub repo, I don't know if this is important, it shouldn't, but when I read it using the pd.read_csv() function on python, I got the following result:

在此处输入图片说明

It seems like pandas is reading some kind of metadata from the file, but not the file itself. I'm running python 3.6 from Jupyterlab on a Debian Google Cloud VM instance. I don't think all of this should be a problem but this is the first time I'm seeing this happening and I have no clue about what's happening.

Could someone please tell me how to fix this problem and explain why is it caused?

Thank you very much in advance.

EDIT

The files are contained in the local folder cloned via URL from the github website. So basically using git clone to your local machine should produce the same effect.

In python, i'm using pd.read_csv('my_file.csv') .

Anotehr curious thing, is that on my personal machine under windows 10 i have no problem at all reading the files. But in the Google Cloud VM instance using exactly the same procedure is where i'm having this strange issue.

You're looking at the Git LFS pointer file instead of the actual file. version , oid and size are parts of the Git LFS spec . Git LFS keeps these files in lieu of the actual large data files in the repository. They are supposed to be seamlessly replaced on checkout.

Check the output of the git clone on the box where you get the wrong result. There seems to be a configuration problem with Git LFS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM