betodealmeida commented on a change in pull request #5634: [viz flow] detect
TIMESTAMP, transition to line chart
URL:
https://github.com/apache/incubator-superset/pull/5634#discussion_r210762238
##########
File path: superset/dataframe.py
##########
@@ -180,15 +180,20 @@ def columns(self):
self._type_dict.get(col) or
self.db_type(self.df.dtypes[col])
)
+ is_date = False
+ if col_db_type:
+ is_date = self.is_date(self.df.dtypes[col]) or any([
+ col_db_type.lower().startswith(s) for s in ('time', 'data')
Review comment:
Should we move this extra logic to the `is_date` method? Eg:
```python
def is_date(self, dtypes, col_db_type=None):
if col_db_type and any(col_db_type.lower().startswith(s) for s in
('time', 'data')):
return True
...
is_date = self.is_date(self.df.dtypes[col], col_db_type.lower())
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]