Skip to content

Commit 916d222

Browse files
committed
836
1 parent c7fcfbb commit 916d222

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/sempy_labs/_helper_functions.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,11 @@ def _process_and_display_chart(df, title, widget):
21602160

21612161
def _convert_data_type(input_data_type: str) -> str:
21622162

2163+
if not input_data_type:
2164+
return None
2165+
2166+
input_data_type = input_data_type.lower()
2167+
21632168
data_type_mapping = {
21642169
"string": "String",
21652170
"int": "Int64",
@@ -2175,10 +2180,10 @@ def _convert_data_type(input_data_type: str) -> str:
21752180
"long": "Int64",
21762181
}
21772182

2178-
if "decimal" in input_data_type:
2179-
return "Decimal"
2180-
else:
2181-
return data_type_mapping.get(input_data_type)
2183+
if input_data_type.startswith("decimal"):
2184+
return "Double"
2185+
2186+
return data_type_mapping.get(input_data_type)
21822187

21832188

21842189
def _is_valid_uuid(

0 commit comments

Comments
 (0)