Skip to content

Commit

Permalink
fix: tiny bug fix to avoid KeyError (#2264)
Browse files Browse the repository at this point in the history
  • Loading branch information
sss04 authored Aug 12, 2024
1 parent 72f99c8 commit eb309fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def log_fit():

@classmethod
def get_column_number(cls, args, kwargs):
if kwargs and kwargs["df"] and isinstance(kwargs["df"], DataFrame):
if kwargs and kwargs.get("df") and isinstance(kwargs["df"], DataFrame):
return len(kwargs["df"].columns)
elif args and len(args) > 0 and isinstance(args[0], DataFrame):
return len(args[0].columns)
Expand Down

0 comments on commit eb309fe

Please sign in to comment.