Skip to content

Commit

Permalink
🎨 applymap depreceated since pandas 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
enryH authored Jan 13, 2025
1 parent f09b231 commit 7af4ccf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sdrf_pipelines/sdrf/sdrf_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ def validate_empty_cells(self, panda_sdrf):
def validate_string(cell_value):
return cell_value is not None and cell_value != "nan" and len(cell_value.strip()) > 0

if sys.version_info <= (3, 8):
# Use map for Python versions less than 3.8
validation_results = panda_sdrf.map(validate_string)
else:
# Use applymap for Python versions 3.8 and above
validation_results = panda_sdrf.applymap(validate_string)
# if sys.version_info <= (3, 8):
# # Use map for Python versions less than 3.8
validation_results = panda_sdrf.map(validate_string)
# else:
# # Use applymap for Python versions 3.8 and above
# validation_results = panda_sdrf.applymap(validate_string)

# Get the indices where the validation fails
failed_indices = [
Expand Down

0 comments on commit 7af4ccf

Please sign in to comment.