API¶
-
class
gtable.
Table
(data={})[source]¶ Table is a class for fast columnar storage using a bitmap index for sparse storage
-
fill_column
(key, fillvalue)[source]¶ Fill N/A elements in the given columns with fillvalue
Parameters: - key – String, list or tuple with the column names to be filled.
- fillvalue – Scalar to fill the N/A elements
Returns:
-
fillna_column
(key, reverse=False, fillvalue=None)[source]¶ Fillna on a column inplace
Parameters: - key – string or list
- reverse –
- fillvalue –
Returns:
-
reduce_by_key
(column, check_sorted=False)[source]¶ Reduce by key
Parameters: - column –
- check_sorted –
Returns:
-
rename_column
(old_name, new_name)[source]¶ Rename a column of the table
Parameters: - old_name –
- new_name –
Returns:
-
required_column
(key, dtype)[source]¶ Enforce the required column with a dtype
Parameters: - key –
- dtype –
Returns:
-
-
class
gtable.
Column
(values, index)[source]¶ Indexed column view of the table
-
contains
(item)[source]¶ Returns a column with the value of the column present in item.
Parameters: item – Returns:
-
date_range
(fr='1970-01-01', to='2262-01-01', include_fr=True, include_to=True)[source]¶ Filter a column by date range.
Parameters: - fr –
- to –
- include_fr –
- include_to –
Returns:
-
dtype
¶ Returns the datatype of the column
-
fill
(fillvalue)[source]¶ Fills the N/A values of the column with the fillvalue :param fillvalue: :return:
-