-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
Description
I tried to use series.get(x) (where x is np.nan in some instance) and the result was an empty series. It seems like it should just return None if it can't be found.
import pandas as pd
import numpy as np
series = pd.Series(range(0, 10))
series.get(np.nan)
# returns None
series = series.reindex(pd.Float64Index(range(0, 10)))
series.get(10)
# This correctly returns None
series.get(np.nan)
# returns empty series with empty Float64Index
series.get(np.nan, np.nan)
# same thing
Metadata
Metadata
Assignees
Labels
BugIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate