intro-stat-learning / ISLP

ISLP package: data and code for labs
Other
117 stars 41 forks source link

always return a two-dimensional column with _get_column #4

Closed jonathan-taylor closed 1 year ago

jonathan-taylor commented 1 year ago

When extracting a column from an ndarray or DataFrame, always return a two-dimensional version (i.e. a shape (-1,1) or a pd.DataFrame).

This ensures that many sklearn transformers will behave better as they expect 2-dim inputs.