Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
rank() makes unexpected inplace changes #18521
import pandas as pd dt = pd.Series([pd.Timestamp('2017-01-05 10:20:27.569000'), pd.NaT]) print("\nBefore") print(dt) # Should not modify the object ranks = dt.rank() print("\nAfter") print(dt)
The rank() method replaces NaT with a concrete date value in the object.
No change in the object.