diff --git a/src/nested_pandas/nestedframe/core.py b/src/nested_pandas/nestedframe/core.py index b0ed818a..5cd0a708 100644 --- a/src/nested_pandas/nestedframe/core.py +++ b/src/nested_pandas/nestedframe/core.py @@ -234,7 +234,7 @@ def __getitem__(self, item): return super().__getitem__(item) def _getitem_str(self, item): - if item in self.nested_columns: + if self._is_nested_column(item): return NestedSeries(super().__getitem__(item)) # Preempt the nested check if the item is a base column, with or without # dots and backticks.