Skip to content

TST: Add to_csv test when writing the single column CSV #19091

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

Merged
merged 2 commits into from
Feb 11, 2018

Conversation

Licht-T
Copy link
Contributor

@Licht-T Licht-T commented Jan 5, 2018

@gfyoung gfyoung added IO CSV read_csv, to_csv Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Testing pandas testing functions or related to the test suite labels Jan 5, 2018
def test_to_csv_with_single_column(self):
# GH18676
df1 = DataFrame([None, 1],
header=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I think you've been in CSV-land for too long? 😄

@gfyoung
Copy link
Member

gfyoung commented Jan 5, 2018

@Licht-T : Overall, well done on patching this bug in its entirety across multiple repositories!

@Licht-T Licht-T force-pushed the add-single-column-to_csv-test branch from 863c59e to 5c4eba5 Compare January 5, 2018 06:37
@codecov
Copy link

codecov bot commented Jan 5, 2018

Codecov Report

Merging #19091 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19091      +/-   ##
==========================================
- Coverage   91.61%   91.59%   -0.03%     
==========================================
  Files         150      150              
  Lines       48807    48807              
==========================================
- Hits        44716    44704      -12     
- Misses       4091     4103      +12
Flag Coverage Δ
#multiple 89.96% <ø> (-0.03%) ⬇️
#single 41.73% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/plotting/_converter.py 65.22% <0%> (-1.74%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 324379c...c8dd813. Read the comment docs.

@Licht-T
Copy link
Contributor Author

Licht-T commented Jan 5, 2018

Re-commit because of the CI falure

@Licht-T Licht-T force-pushed the add-single-column-to_csv-test branch from 5c4eba5 to fd6fd13 Compare January 5, 2018 06:44
@jreback jreback added this to the 0.23.0 milestone Jan 5, 2018
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment

@@ -9,6 +10,30 @@

class TestToCSV(object):

@pytest.mark.xfail((3, 6, 5) > sys.version_info >= (3, 5),
reason='Python csv library bug')
Copy link
Contributor

@jreback jreback Jan 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put a reference to the bug, and a comment on what it is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add the link to the xfail reason

@jreback
Copy link
Contributor

jreback commented Feb 10, 2018

can you rebase / update

@gfyoung
Copy link
Member

gfyoung commented Feb 10, 2018

@jreback : I can carry this to the finish line.

@gfyoung gfyoung force-pushed the add-single-column-to_csv-test branch from fd6fd13 to bcda52d Compare February 11, 2018 04:40
@@ -9,6 +10,30 @@

class TestToCSV(object):

@pytest.mark.xfail((3, 6, 5) > sys.version_info >= (3, 5),
reason='Python csv library bug')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add the link to the xfail reason

@jreback
Copy link
Contributor

jreback commented Feb 11, 2018

thanks @gfyoung tiny comment. pls fix and merge away

@gfyoung gfyoung force-pushed the add-single-column-to_csv-test branch from bcda52d to c8dd813 Compare February 11, 2018 17:11
@gfyoung
Copy link
Member

gfyoung commented Feb 11, 2018

@jreback : Done. Will wait until green before merging.

@gfyoung
Copy link
Member

gfyoung commented Feb 11, 2018

Alright, all is green. Merging this.

@gfyoung gfyoung merged commit b9d8b26 into pandas-dev:master Feb 11, 2018
@gfyoung
Copy link
Member

gfyoung commented Feb 11, 2018

Thanks @Licht-T for your hard work on tracking this down!

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

to_csv writes wrong with NaN value
3 participants