Cannot call get_metadata
on a DataFrameModel if there is a Config without a metadata attribute
#1640
Open
2 of 3 tasks
Labels
bug
Something isn't working
Describe the bug
I have a
DataFrameModel
with a customConfig
. When I tried to define a class method that returns a subset of columns with certain metadata, I found that I needed to either addmetadata = None
on my custom config or change the config to inherit fromBaseConfig
. It'd be nice to allow using column-level metadata without having to define schema-level metadata.Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Here's a minimal example that raises
AttributeError: type object 'Config' has no attribute 'metadata'
:Expected behavior
If we add
metadata = None
on Config or make the Config inherit frompandera.api.pandas.model_config.BaseConfig
, then the snippet above produces the expected output of["foo"]
.Desktop (please complete the following information):
0.19.2
The text was updated successfully, but these errors were encountered: