ColinLeeo commented on code in PR #388: URL: https://github.com/apache/tsfile/pull/388#discussion_r1975569262
########## python/tsfile/constants.py: ########## @@ -45,6 +45,32 @@ def to_py_type(self): elif self == TSDataType.TEXT or self == TSDataType.STRING: return str + def to_pandas_dtype(self): + """ + Convert datatype to pandas dtype + """ + if self == TSDataType.BOOLEAN: + return "bool" + elif self == TSDataType.INT32: + return "int32" + elif self == TSDataType.INT64: + return "int64" + elif self == TSDataType.FLOAT: + return "float32" + elif self == TSDataType.DOUBLE: + return "float64" + elif self == TSDataType.TEXT or self == TSDataType.STRING: + return "object" + elif self == TSDataType.TIMESTAMP: + return "datetime64[ns]" + elif self == TSDataType.DATE: + return "datetime64[ns]" Review Comment: fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@tsfile.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org