Skip to content

Commit 92e34b9

Browse files
committed
Removing nan from entire data frame
1 parent 33d7cea commit 92e34b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

reproschema/redcap2reproschema.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,7 @@ def process_csv(csv_file, abs_folder_path, schema_context_url, protocol_name):
569569
)
570570

571571
# Clean string values in the dataframe
572-
object_columns = df.select_dtypes(include=["object"]).columns
573-
for col in object_columns:
574-
df[col] = df[col].astype(str).replace("nan", "")
572+
df = df.astype(str).replace("nan", "")
575573

576574
# Initialize structures for each unique form
577575
unique_forms = df["Form Name"].unique()

0 commit comments

Comments
 (0)