11#!/usr/bin/env python
22# -*- coding: utf-8; -*-
33
4- # Copyright (c) 2020, 2022 Oracle and/or its affiliates.
4+ # Copyright (c) 2020, 2024 Oracle and/or its affiliates.
55# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
66
77import matplotlib
4949
5050NATURAL_EARTH_DATASET = "naturalearth_lowres"
5151
52+
5253class PandasDataset (object ):
5354 """
5455 This class provides APIs that can work on a sampled dataset.
@@ -107,7 +108,6 @@ def __init__(
107108 self .sampled_df = self .sampled_df .reset_index (drop = True )
108109
109110 def _find_feature_subset (self , df , target_name , include_n_features = 32 ):
110-
111111 if len (df .columns ) <= include_n_features :
112112 return self .sampled_df
113113 else :
@@ -212,7 +212,6 @@ def _calculate_dataset_statistics(self, is_wide_dataset, out):
212212 def _generate_features_html (
213213 self , is_wide_dataset , n_features , df_stats , visualizations_follow
214214 ):
215-
216215 html = utils .get_bootstrap_styles ()
217216
218217 if is_wide_dataset :
@@ -233,7 +232,7 @@ def _generate_features_html(
233232 if ("float" in str (type (x ))) or ("int" in str (type (x )))
234233 else x
235234 )
236- .render ()
235+ .to_html ()
237236 )
238237
239238 if visualizations_follow :
@@ -244,7 +243,6 @@ def _generate_features_html(
244243 def _generate_warnings_html (
245244 self , is_wide_dataset , n_rows , n_features , df_stats , out , accordion
246245 ):
247-
248246 #
249247 # create the "Warnings" accordion section:
250248 # - show high cardinal categoricals
0 commit comments