MCPcopy Create free account
hub / github.com/dask/dask / __getattr__

Method __getattr__

dask/dataframe/dask_expr/_collection.py:3122–3135  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

3120 object.__setattr__(self, key, value)
3121
3122 def __getattr__(self, key):
3123 try:
3124 # Prioritize `DataFrame` attributes
3125 return object.__getattribute__(self, key)
3126 except AttributeError as err:
3127 try:
3128 # Check if key is in columns if key
3129 # is not a normal attribute
3130 if key in self.expr._meta.columns:
3131 return new_collection(self.expr[key])
3132 raise err
3133 except AttributeError:
3134 # Fall back to `BaseFrame.__getattr__`
3135 return super().__getattr__(key)
3136
3137 def __dir__(self):
3138 o = set(dir(type(self)))

Callers

nothing calls this directly

Calls 2

new_collectionFunction · 0.90
__getattr__Method · 0.45

Tested by

no test coverage detected