MCPcopy Index your code
hub / github.com/spotify/chartify / _cast_datetime_axis

Method _cast_datetime_axis

chartify/_core/plot.py:143–147  ·  view source on GitHub ↗
(self, data_frame, column)

Source from the content-addressed store, hash-verified

141 return bokeh.models.ColumnDataSource(data_frame, name=cannonical_series_name)
142
143 def _cast_datetime_axis(self, data_frame, column):
144 if self._chart._x_axis_type == "datetime":
145 if data_frame[column].dtype != "datetime64[ns]":
146 return data_frame.astype({column: "datetime64[ns]"})
147 return data_frame
148
149 def __getattr__(self, item):
150 """Override attribute error"""

Callers 4

lineMethod · 0.80
scatterMethod · 0.80
textMethod · 0.80
areaMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected