You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any reason why we shouldn't just use the same keyword (either copy or inplace) in all functions to determine whether to modify the original object or make a new one?
The text was updated successfully, but these errors were encountered:
I understand your point. To be clear, right now reindex_axis is written such that it always returns an object. So inplace would actually be new functionality (i.e. keeping data with the original object reference). Also, when copy=False, there's no guarantee that a copy isn't made, copy means "force copy" here.
From the docs on reindex_axis:
copy : boolean, default True
Return a new object, even if the passed indexes are the same
sort_index always makes a copy of the underlying data.
I believe the rationale for that is that you might use reindex_axis to perform alignment first, then manipulate the object, so you might not want to get a copy if it turns out that both objects are actually indexed with the exact same Index object.
If I understand this right, the syntax is:
but is
Any reason why we shouldn't just use the same keyword (either
copy
orinplace
) in all functions to determine whether to modify the original object or make a new one?The text was updated successfully, but these errors were encountered: