Skip to content

Commit

Permalink
Add informative error message to Series.__getitem__
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Mar 27, 2019
1 parent 77af7c8 commit 0b76096
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dask/dataframe/core.py
Expand Up @@ -2052,7 +2052,10 @@ def __getitem__(self, key):
dsk = partitionwise_graph(operator.getitem, name, self, key)
graph = HighLevelGraph.from_collections(name, dsk, dependencies=[self, key])
return Series(graph, name, self._meta, self.divisions)
raise NotImplementedError()
raise NotImplementedError(
"Series getitem in only supported for other series objects "
"with matching partition structure"
)

@derived_from(pd.DataFrame)
def _get_numeric_data(self, how='any', subset=None):
Expand Down

0 comments on commit 0b76096

Please sign in to comment.