-
Notifications
You must be signed in to change notification settings - Fork 367
DataFrame.to_records #298
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
DataFrame.to_records #298
Conversation
Codecov Report
@@ Coverage Diff @@
## master #298 +/- ##
==========================================
+ Coverage 94.31% 94.33% +0.02%
==========================================
Files 35 35
Lines 3551 3564 +13
==========================================
+ Hits 3349 3362 +13
Misses 202 202
Continue to review full report at Codecov.
|
|
@rxin I am getting this exception for Pandas 0.23.4 Should I skip doctest for it. |
|
@shril I suggest that you delete the parameter if LooseVersion(pd.__version__) < LooseVersion("0.24.0"):
del args['column_dtypes'] |
Thanks again @garawalid |
|
@shril this doesn't merge cleanly anymore. Can you merge master into your branch so this can merge cleanly? |
|
Yea, many PRs are rapidly being merged. I will take a look as soon as it's merged to master. |
|
@rxin @HyukjinKwon I will look into this today. |
|
@rxin, @HyukjinKwon I have made the required changes. PR #169. |
HyukjinKwon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
| >>> df.to_records(index_dtypes="<S2") # doctest: +SKIP | ||
| rec.array([(b'a', 1, 0.5 ), (b'b', 2, 0.75)], | ||
| dtype=[('index', 'S2'), ('A', '<i8'), ('B', '<f8')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we checking different version of doc? Seems not matched - https://github.com/pandas-dev/pandas/blob/v0.24.2/pandas/core/frame.py#L1558-L1741
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HyukjinKwon, I am having this issue that dtypes were added in Pandas 0.24.0. So the doc-tests are failing for the lower version of Pandas. So I am skipping the tests for them although I have pushed unit tests for every variation of the function.
|
Thanks, @shril |
|
You are most welcome @HyukjinKwon. |
@rxin, @ueshin Please have a look at my PR. #169
Happy to help regarding my changes.
Reference Pandas Doc: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_records.html