Skip to content

Commit

Permalink
#6638 fixed table display type conversion (#6650)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmitusinski authored and scottdraves committed Jan 12, 2018
1 parent ba8331b commit 3423bad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions beakerx/beakerx/tabledisplay/tabledisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def convert_from_pandas(self, args, types_map):

@staticmethod
def convert_value(value, value_type):
if value_type == "time":
if value == "":
converted_value = value
elif value_type == "time":
converted_value = DateType(value)
elif value_type == "double":
converted_value = value.astype('str')
Expand Down Expand Up @@ -163,10 +165,10 @@ def convert_type(object_type, value):
return "int64"
if isinstance(value, int):
return "integer"
if object_type.startswith("datetime64"):
return "time"
if isinstance(value, str):
return "string"
if "datetime" in str(object_type):
return "time"
return "string"


Expand Down

0 comments on commit 3423bad

Please sign in to comment.