Closed resivalex closed 3 years ago
Hi @resivalex,
Could you explain why sqlalchemy.sql.elements.quoted_name
doesn't work as a str type? If you can share some test example with us, we will try to reproduce it on our side and fix.
Alex
lightautoml/dataset/np_pd_dataset.py:501
if type(columns) is str:
idx = self.data.columns.get_loc(columns)
else:
idx = self.data.columns.get_indexer(columns)
columns
has type sqlalchemy.sql.elements.quoted_name
, which isn't str
, and execution goes to "else" branch
Test example https://www.kaggle.com/resivalex/non-string-feature-names-case/
I got a dataframe by
pandas.read_sql_table
. Every column name has a typesqlalchemy.sql.elements.quoted_name
. Many checks in the source code rely onstr
, sofit_predict
fails.Should the library notify developers about unsupported column name types, convert them to strings or allow column names to have any type?