Skip to content

Commit

Permalink
refactored lazy frames to use .collect_schema().names() to fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-fong committed Aug 15, 2024
1 parent c220f37 commit e8cacd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion skpro/datatypes/_adapter/polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def check_polars_frame(obj, return_metadata=False, var_name="obj", lazy=False):
if _req("n_features", return_metadata):
metadata["n_features"] = obj.width
if _req("feature_names", return_metadata):
metadata["feature_names"] = obj.columns
if lazy:
metadata["feature_names"] = obj.collect_schema().names()
else:
metadata["feature_names"] = obj.columns

# check if there are any nans
# compute only if needed
Expand Down

0 comments on commit e8cacd6

Please sign in to comment.