diff --git a/python/cuxfilter/charts/bokeh/plots/bar.py b/python/cuxfilter/charts/bokeh/plots/bar.py index 86d1b9f5..b204e18e 100644 --- a/python/cuxfilter/charts/bokeh/plots/bar.py +++ b/python/cuxfilter/charts/bokeh/plots/bar.py @@ -10,7 +10,9 @@ class InteractiveBar(param.Parameterized): x = param.String("x", doc="x axis column name") y = param.List(["y"], doc="y axis column names as a list") source_df = param.ClassSelector( - class_=(cudf.DataFrame, pd.DataFrame), default=cudf.DataFrame(), doc="source dataframe" + class_=(cudf.DataFrame, pd.DataFrame), + default=cudf.DataFrame(), + doc="source dataframe", ) box_stream = param.ClassSelector( class_=hv.streams.SelectionXY, default=hv.streams.SelectionXY() diff --git a/python/cuxfilter/charts/core/core_chart.py b/python/cuxfilter/charts/core/core_chart.py index 4b0d61ee..fa4555de 100644 --- a/python/cuxfilter/charts/core/core_chart.py +++ b/python/cuxfilter/charts/core/core_chart.py @@ -62,7 +62,9 @@ def library_specific_params(self): def x_dtype(self): if isinstance(self.source, ColumnDataSource): return self.source.data[self.data_x_axis].dtype - elif isinstance(self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + elif isinstance( + self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.source[self.x].dtype return None @@ -70,7 +72,9 @@ def x_dtype(self): def y_dtype(self): if isinstance(self.source, ColumnDataSource): return self.source.data[self.data_x_axis].dtype - elif isinstance(self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + elif isinstance( + self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.source[self.y].dtype return None diff --git a/python/cuxfilter/charts/core/non_aggregate/core_graph.py b/python/cuxfilter/charts/core/non_aggregate/core_graph.py index 08361319..f0216ec9 100644 --- a/python/cuxfilter/charts/core/non_aggregate/core_graph.py +++ b/python/cuxfilter/charts/core/non_aggregate/core_graph.py @@ -170,13 +170,17 @@ def __init__( @property def x_dtype(self): - if isinstance(self.nodes, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + if isinstance( + self.nodes, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.nodes[self.node_x].dtype return None @property def y_dtype(self): - if isinstance(self.nodes, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + if isinstance( + self.nodes, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.nodes[self.node_y].dtype return None diff --git a/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py b/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py index 55b793eb..b4982781 100644 --- a/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py +++ b/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py @@ -31,7 +31,9 @@ def y_dtype(self): overwriting the y_dtype property from BaseChart for stackedLines where self.y is a list of columns """ - if isinstance(self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + if isinstance( + self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.source[self.y[0]].dtype return None diff --git a/python/cuxfilter/charts/panel_widgets/plots.py b/python/cuxfilter/charts/panel_widgets/plots.py index ad130eeb..8bca3c65 100644 --- a/python/cuxfilter/charts/panel_widgets/plots.py +++ b/python/cuxfilter/charts/panel_widgets/plots.py @@ -89,7 +89,9 @@ class DateRangeSlider(BaseWidget): def x_dtype(self): if isinstance(self.source, ColumnDataSource): return self.source.data[self.data_x_axis].dtype - elif isinstance(self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame)): + elif isinstance( + self.source, (cudf.DataFrame, dask_cudf.DataFrame, pd.DataFrame) + ): return self.source[self.x].dtype return None