-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
DeprecateFunctionality to remove in pandasFunctionality to remove in pandasDocsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Milestone
Description
Location of the documentation
Documentation problem
Surprisingly, the following code works:
import pandas as pd df = pd.DataFrame([["a", 1], ["b", 2], ["c", 3]], columns=["let", "num"]).set_index( "let" ) dfl = df.loc[set(["a", "b"]), :] print(dfl) dd = {"a": 10, "c": 12} dfd = df.loc[dd, "num"] print(dfd)In the documentation, we don't say that you can pass a set or a dict as one of the arguments to .loc .
So either we update the documentation, or maybe we should be raising an Exception?
Metadata
Metadata
Assignees
Labels
DeprecateFunctionality to remove in pandasFunctionality to remove in pandasDocsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves