Table View#

core.view_dataframe(drop_duplicates=False, force_computation=False)#
Parameters:
columns: list, default None

display subset of columns, and all columns if None

drop_duplicates: bool, default False

display only unique rows if True

force_computation: bool, default False
  • force_computation=False returns df.head(1000)

  • force_computation=True returns entire df, but it can be

computationally intensive

Returns:
A view dataframe object.
Type cuxfilter.charts.core_view_dataframe.ViewDataFrame

Example#

import numpy as np
import cudf
import cuxfilter

geoJSONSource='https://raw.githubusercontent.com/rapidsai/cuxfilter/GTC-2018-mortgage-visualization/javascript/demos/GTC%20demo/src/data/zip3-ms-rhs-lessprops.json'
size = 1000

cux_df = cuxfilter.DataFrame.from_dataframe(
    cudf.DataFrame({
                    '_color':np.random.randint(20,30, size=size*10)/100,
                    'zip': list(np.arange(1,1001))*10,
                    'elevation': np.random.randint(0,1000, size=size*10)
    })
)

chart0 = cuxfilter.charts.view_dataframe(['zip', 'elevation'])

#declare dashboard
d = cux_df.dashboard([chart0], title='Mortgage Dashboard')

# cuxfilter.load_notebook_assets()
chart0.view()