-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DOC: Update to docstring of pd.DataFrame(dtype) #14868
Conversation
@@ -231,6 +231,23 @@ class DataFrame(NDFrame): | |||
>>> df3 = DataFrame(np.random.randn(10, 5), | |||
... columns=['a', 'b', 'c', 'd', 'e']) | |||
|
|||
Exceptional Behaviour |
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.
should read Examples
Current coverage is 85.26% (diff: 100%)@@ master #14868 diff @@
==========================================
Files 144 144
Lines 50980 50980
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43470 43470
Misses 7510 7510
Partials 0 0
|
Personally, I am not convinced that these examples are needed in the DataFrame docstring
|
@patniharshit Can you update? |
yeah sure |
@@ -231,6 +231,21 @@ class DataFrame(NDFrame): | |||
>>> df3 = DataFrame(np.random.randn(10, 5), | |||
... columns=['a', 'b', 'c', 'd', 'e']) | |||
|
|||
Leaving dtype=None in constructor will infer a wider type than necessary |
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.
can you show an a typical example of passing a dtype, with a single type, then multiple types, then this example.
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.
What do you mean by an example passing multiple types? Is that possible to pass in multiple types?
month int64 | ||
year int64 | ||
|
||
A list/dict/Series/array-like is not allowed. Also behaves differently to read_csv(dtype) |
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.
not sure what you are trying to show here, this is just confusing (after line 241)
can you rebase / update |
I am extremely sorry to say that I won't be able to complete this now. Either someone take this up or feel free to close/delete this. |
thanks @patniharshit np problem. |
git diff upstream/master | flake8 --diff
All suggestions to improve this are welcome.