-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google cloud storage csv file write with pandas empty lines #176
Comments
What platform are you on? |
I'm using windows local environment |
Hmm yeah that's what I guessed. Possibly something with universal line
endings.
Do you have time to check whether the issue is in pandas or gcsfs?
…On Fri, Sep 13, 2019 at 7:15 AM Paolo Fusari ***@***.***> wrote:
What platform are you on?
I'm using windows local environment
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#176>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIXOFQKSONCMRKGDAP3QJN76ZANCNFSM4IWN4RDA>
.
|
Wasn't there an issue with text mode and line endings? I thought we had dealt with that, so perhaps getting latest fsspec will fix. |
Yeah, there were various issues around that. It only affected when a
file-object was passed in, but perhaps
that's what pandas is doing internally.
…On Fri, Sep 13, 2019 at 8:41 AM Martin Durant ***@***.***> wrote:
Wasn't there an issue with text mode and line endings? I thought we had
dealt with that, so perhaps getting latest fsspec will fix.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#176>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIRGHIEVN4OH4WQQPOLQJOKAHANCNFSM4IWN4RDA>
.
|
I'll try to make the test this week. I also make a test creating the file on Google App Engine and the file was created correctly without empty lines. |
I tried to write a file line by line only with gcsfs and worked correctly without empty lines |
I think pandas-dev/pandas#21406 is the relevant pandas issue. What happens with import pandas as pd
df = pd.DataFrame({'a': [1, 2], 'b': [1, 2]})
df.to_csv('filename.csv')
df.to_csv('gs://BUCKET_NAME/filename.csv', newline="\n") |
Sorry for the delay. import pandas as pd
df = pd.DataFrame({'a': [1, 2], 'b': [1, 2]})
df.to_csv('filename.csv')
df.to_csv('gs://BUCKET_NAME/filename.csv', line_terminator="\n") |
OK to close, then? |
Yes, thanks |
Hi,
Seems to be a difference in creating file local with respect to google cloud storage
filename.csv
gs://BUCKET_NAME/filename.csv
gs://BUCKET_NAME/filename.csv file seems to add a new line for each inserted line.
python version 3.6.4
gcsfs version 0.3.0
pandas version 0.25.1
The text was updated successfully, but these errors were encountered: