DataFrameTransformer requires pandas but we don't want to have a dependency on pandas in skorch. Therefore, the pandas import should be local.
Back when I wrote this class, I thought it would be sufficient to import pandas at a class level, but that is incorrect. Now, pandas is important inside the method bodies.
For most skorch users, this should make no difference. But it will allow skorch users who use something from helpers.py to avoid having to install pandas.
DataFrameTransformer
requires pandas but we don't want to have a dependency on pandas in skorch. Therefore, the pandas import should be local.Back when I wrote this class, I thought it would be sufficient to import pandas at a class level, but that is incorrect. Now, pandas is important inside the method bodies.
For most skorch users, this should make no difference. But it will allow skorch users who use something from
helpers.py
to avoid having to install pandas.