-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
DOC: update the DataFrame.reindex_like docstring #22775
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
Changes from 1 commit
bab3a2b
cd3ec62
1ee2751
2cbf5dd
92c1d2f
5bcee6d
2729193
4851b91
be1a774
7072e4a
88e6e37
38c5c94
4518791
9d58d4e
10000
363e8c0
4d59844
6bf4977
2a838f2
7df1f79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3333,11 +3333,11 @@ def reindex_like(self, other, method=None, copy=True, limit=None, | |
tolerance=None): | ||
""" | ||
Return an object with matching indices as other object. | ||
Conform the object to the same index on all axes. Optional filling logic, | ||
placing NA/NaN in locations having no value in the previous index. | ||
A new object is produced unless the new index is equivalent to the | ||
current one and copy=False. | ||
|
||
Conform the object to the same index on all axes. Optional | ||
filling logic, placing NA/NaN in locations having no value | ||
in the previous index. A new object is produced unless the | ||
new index is equivalent to the current one and copy=False. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -3360,7 +3360,7 @@ def reindex_like(self, other, method=None, copy=True, limit=None, | |
Returns | ||
------- | ||
Object | ||
same object type as input object, but with changed indices on each axis | ||
same object type as input, but with changed indices on each axis | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can leave out the "Object" line, and directly put the explanation on that line. And can you use Capital first character and end point punctuation? |
||
|
||
See Also | ||
-------- | ||
|
@@ -3369,19 +3369,21 @@ def reindex_like(self, other, method=None, copy=True, limit=None, | |
DataFrame.reindex : change to new indices or expand indices | ||
|
||
Examples | ||
-------- | ||
-------- | ||
>>> df_weather_station_1 = pd.DataFrame([[24.3, 75.7, 'high'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the |
||
... [31, 87.8, 'high'], | ||
... [22, 71.6, 'medium'], | ||
... [35, 95, 'medium']], | ||
... columns=['temp_celsius', 'temp_fahrenheit', 'windspeed'], | ||
... index=pd.date_range(start='2014-02-12', end='2014-02-15', freq='D')) | ||
... index=pd.date_range(start='2014-02-12', | ||
... end='2014-02-15', freq='D')) | ||
|
||
>>> df_weather_station_2 = pd.DataFrame([[28, 'low'], | ||
>>> df_weather_station_2 = pd.DataFrame([[28, 'low'], | ||
... [30, 'low'], | ||
... [35.1, 'medium']], | ||
... columns=['temp_celsius', 'windspeed'], | ||
... index=pd.DatetimeIndex(['2014-02-12', '2014-02-13', '2014-02-15'])) | ||
... columns=['temp_celsius', 'windspeed'], | ||
... index=pd.DatetimeIndex(['2014-02-12', '2014-02-13', | ||
... '2014-02-15'])) | ||
datapythonista marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
>>> df_weather_station_2.reindex_like(df_weather_station_1) | ||
temp_celsius temp_fahrenheit windspeed | ||
|
@@ -4088,7 +4090,6 @@ def _reindex_multi(self, axes, copy, fill_value): | |
|
||
Examples | ||
-------- | ||
|
||
>>> df.reindex_axis(['A', 'B', 'C'], axis=1) | ||
math-and-data marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""") | ||
|
||
|
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.
Just say
NaN