8000 DOC: Update to docstring of DataFrame(dtype) (#14764) by VincentLa · Pull Request #16487 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Update to docstring of DataFrame(dtype) (#14764) #16487

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 7 commits into from
May 31, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
small edit
  • Loading branch information
jorisvandenbossche committed May 31, 2017
commit 6108d69f5b3baf634a6ac58384f777a91526e80a
10 changes: 5 additions & 5 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ class DataFrame(NDFrame):
Constructing DataFrame from a dictionary.

>>> d = {'col1': [1, 2], 'col2': [1, 2]}
>>> df = DataFrame(data=d)
>>> df = pd.DataFrame(data=d)
>>> df
col1 col2
0 1 3
1 2 4
col1 col2
0 1 1
1 2 2

Notice that the inferred dtype is int64.

Expand All @@ -265,7 +265,7 @@ class DataFrame(NDFrame):

To enforce a single dtype:

>>> df = DataFrame(data=d, dtype=np.int8)
>>> df = pd.DataFrame(data=d, dtype=np.int8)
>>> df.dtypes
col1 int8
col2 int8
Expand Down
0