Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Team:Data Release Production
Description
Starting to set up a demo notebook for Quansight, I realize that I can't call a simple functor (e.g., a labeler) on a single-level parquet table (e.g., a analysisCoaddTable_forced):
---------------------------------------------------------------------------
|
TypeError Traceback (most recent call last)
|
<ipython-input-19-2b4d44d689db> in <module>
|
1 labeller = StarGalaxyLabeller()
|
----> 2 label = labeller(coaddParq)
|
|
~/qa_explorer/python/lsst/qa/explorer/functors.py in __call__(self, parq, dropna, **kwargs)
|
671
|
672 def __call__(self, parq, dropna=False, **kwargs):
|
--> 673 return super().__call__(parq, dropna=False, **kwargs)
|
674
|
675
|
|
~/qa_explorer/python/lsst/qa/explorer/functors.py in __call__(self, parq, dropna)
|
140
|
141 def __call__(self, parq, dropna=False):
|
--> 142 df = self._get_cols(parq)
|
143
|
144 vals = self._func(df)
|
|
~/qa_explorer/python/lsst/qa/explorer/functors.py in _get_cols(self, parq)
|
127 columns = self.columns
|
128
|
--> 129 df = parq.toDataFrame(columns=columns, droplevels=False)
|
130 df = self._setLevels(df)
|
131 return df
|
|
TypeError: toDataFrame() got an unexpected keyword argument 'droplevels'
|
Attachments
Issue Links
- blocks
-
DM-20015 Get Quansight developers up to speed with test dataset & LSST stack
- Done
OK, the following now works:
labels.describe()
Gives the output:
count 1615018
unique 3
top galaxy
freq 1175532
Name: label, dtype: object