Skip to content

Commit

Permalink
Raise minimum pandas version to 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Aug 16, 2024
1 parent 9b292e6 commit cdca9e2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Requirements
- numexpr
- numpy
- osqp
- pandas 1.0.5 or later
- pandas 1.4.0 or later
- scikit-learn 1.4 or 1.5
- scipy
- C/C++ compiler
Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The current minimum dependencies to run scikit-survival are:
- numexpr
- numpy
- osqp
- pandas 1.0.5 or later
- pandas 1.4.0 or later
- scikit-learn 1.4 or 1.5
- scipy
- C/C++ compiler
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies = [
"numexpr",
"numpy",
"osqp !=0.6.0,!=0.6.1",
"pandas >=1.0.5",
"pandas >=1.4.0",
"scipy >=1.3.2",
"scikit-learn >=1.4.0,<1.6",
]
Expand Down
10 changes: 0 additions & 10 deletions sksurv/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,8 @@ def standardize(table, with_std=True):
Table with numeric columns normalized.
Categorical columns in the input table remain unchanged.
"""
if isinstance(table, pd.DataFrame):
cat_columns = table.select_dtypes(include=["category"]).columns
else:
cat_columns = []

new_frame = _apply_along_column(table, standardize_column, with_std=with_std)

# work around for apply converting category dtype to object
# https://github.com/pydata/pandas/issues/9573
for col in cat_columns:
new_frame[col] = table[col].copy()

return new_frame


Expand Down

0 comments on commit cdca9e2

Please sign in to comment.