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 213a142 commit 49a6e63Copy full SHA for 49a6e63
openhexa/toolbox/kobo/parse.py
@@ -74,7 +74,7 @@ def cast_calculate(value: str) -> str:
74
if value == "NaN":
75
return None
76
try:
77
- return float(value)
+ return str(value)
78
except ValueError:
79
return value
80
@@ -137,7 +137,7 @@ def cast_values(df: pl.DataFrame, survey: Survey) -> pl.DataFrame:
137
138
elif field.type == "calculate":
139
df = df.with_columns(
140
- pl.col(column).map_elements(lambda x: cast_calculate(x), return_dtype=pl.Utf8, skip_nulls=False)
+ pl.col(column).map_elements(lambda x: cast_calculate(x), return_dtype=pl.String, skip_nulls=False)
141
)
142
143
elif field.type == "date":
0 commit comments