Skip to content

Commit

Permalink
refactor for conciseness.
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Jun 7, 2024
1 parent 50f3c78 commit 65733a5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tableone/tableone.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,7 @@ def __init__(self, data: pd.DataFrame,

# if categorical is set to None, try to automatically detect
# if empty list is provided, assume there are no categorical variables.
if categorical is None:
self._categorical = detect_categorical(data[self._columns], groupby)
else:
self._categorical = categorical

self._categorical = detect_categorical(data[self._columns], groupby) if categorical is None else categorical
self._order = order_categorical(data, order)

self._alt_labels = rename
Expand Down

0 comments on commit 65733a5

Please sign in to comment.