Skip to content

Commit

Permalink
PythonBlack changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Feb 28, 2024
1 parent cebeb4d commit d71719d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sdrf_pipelines/sdrf/sdrf_schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import re
import sys
import typing
from typing import Any

Expand Down Expand Up @@ -325,8 +326,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

# Apply the validation function element-wise
validation_results = panda_sdrf.map(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 d71719d

Please sign in to comment.