Skip to content

BUG in read_csv skipping rows after a row with trailing spaces, #8983 #8984

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 1 commit into from
Dec 3, 2014
Merged

BUG in read_csv skipping rows after a row with trailing spaces, #8983 #8984

merged 1 commit into from
Dec 3, 2014

Conversation

selasley
Copy link
Contributor

@selasley selasley commented Dec 3, 2014

Update tokenizer.c to fix a BUG in read_csv skipping rows after tokenizing a row with trailing spaces, Closes #8983

@@ -3070,6 +3070,13 @@ def test_trailing_spaces(self):
header=None, delim_whitespace=True,
skiprows=[0,1,2,3,5,6], skip_blank_lines=True)
tm.assert_frame_equal(df, expected)
# test skipping set of rows after a row with trailing spaces
expected = pd.DataFrame({"A":[1., 5.1], "B":[2., np.nan],
Copy link
Contributor

Choose a reason for hiding this comment

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

pls add the issue number as a comment

@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

pls add the issue number into the same release note that dealt with this

otherwise looks good

ping when ready

@jreback jreback added this to the 0.15.2 milestone Dec 3, 2014
@jreback jreback added Bug IO CSV read_csv, to_csv labels Dec 3, 2014
@selasley
Copy link
Contributor Author

selasley commented Dec 3, 2014

added the issue number to whatsnew/v0.15.2.txt and to test_parsers.py

jreback added a commit that referenced this pull request Dec 3, 2014
BUG in read_csv skipping rows after a row with trailing spaces, #8983
@jreback jreback merged commit f5a4dfa into pandas-dev:master Dec 3, 2014
@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

@selasley awesome! thanks for the fixes. not many want to delve into the c-parser!

@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

if you are interested:

#8985, #6710

@selasley
Copy link
Contributor Author

selasley commented Dec 3, 2014

This may not be the appropriate place for this comment and you probably hear it often, but thank you for pandas. I converted some python scripts we wrote to plot our near-real time SOHO MTOF data on the web from numpy+matplotlib to pandas. The scripts are much easier to follow now and I was able to add a few features that would have been cumbersome to do with straight numpy. I'll see if I can do anything with 8985 and 6710. I believe there are still some bugs in read_csv with certain combinations of options. I'll work on fixing any that I can find as time allows.

@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

@selasley always appropriate for praise :)

glad to see you are using it!

and feel free to chime in on any issues...thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG in read_csv skipping a row after a row with trailing spaces
2 participants