We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2424286 commit da084acCopy full SHA for da084ac
pandas/core/generic.py
@@ -197,8 +197,9 @@ def _dir_additions(self):
197
""" add the string-like attributes from the info_axis.
198
If info_axis is a MultiIndex, it's first level values are used.
199
"""
200
- additions = set([c for c in self._info_axis.get_level_values(0)
201
- if isinstance(c, string_types) and isidentifier(c)])
+ additions = set(
+ [c for c in self._info_axis.unique(level=0)[:100]
202
+ if isinstance(c, string_types) and isidentifier(c)])
203
return super(NDFrame, self)._dir_additions().union(additions)
204
205
@property
0 commit comments