We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c0332d commit 710922eCopy full SHA for 710922e
upload_to_sheets.py
@@ -43,7 +43,7 @@ def read_csv(file_path):
43
# Replace NaN values with empty strings
44
df = df.fillna('')
45
# Convert all values to strings and strip whitespace
46
- df = df.applymap(lambda x: str(x).strip() if isinstance(x, str) else x)
+ df = df.astype(str).apply(lambda x: x.str.strip())
47
return [df.columns.tolist()] + df.values.tolist()
48
except FileNotFoundError:
49
print(f"Error: CSV file not found at {file_path}")
0 commit comments