GArrowTable

GArrowTable — Table class

Functions

GArrowTable * garrow_table_new ()
gboolean garrow_table_equal ()
GArrowSchema * garrow_table_get_schema ()
GArrowColumn * garrow_table_get_column ()
guint garrow_table_get_n_columns ()
guint64 garrow_table_get_n_rows ()
GArrowTable * garrow_table_add_column ()
GArrowTable * garrow_table_remove_column ()
GArrowTable * garrow_table_replace_column ()

Types and Values

Description

GArrowTable is a class for table. Table has zero or more GArrowColumns and zero or more records.

Functions

garrow_table_new ()

GArrowTable *
garrow_table_new (GArrowSchema *schema,
                  GList *columns);

Parameters

schema

The schema of the table.

 

columns

The columns of the table.

[element-type GArrowColumn]

Returns

A newly created GArrowTable.


garrow_table_equal ()

gboolean
garrow_table_equal (GArrowTable *table,
                    GArrowTable *other_table);

Parameters

table

A GArrowTable.

 

other_table

A GArrowTable to be compared.

 

Returns

TRUE if both of them have the same data, FALSE otherwise.

Since: 0.4.0


garrow_table_get_schema ()

GArrowSchema *
garrow_table_get_schema (GArrowTable *table);

Parameters

table

A GArrowTable.

 

Returns

The schema of the table.

[transfer full]


garrow_table_get_column ()

GArrowColumn *
garrow_table_get_column (GArrowTable *table,
                         guint i);

Parameters

table

A GArrowTable.

 

i

The index of the target column.

 

Returns

The i-th column in the table.

[transfer full]


garrow_table_get_n_columns ()

guint
garrow_table_get_n_columns (GArrowTable *table);

Parameters

table

A GArrowTable.

 

Returns

The number of columns in the table.


garrow_table_get_n_rows ()

guint64
garrow_table_get_n_rows (GArrowTable *table);

Parameters

table

A GArrowTable.

 

Returns

The number of rows in the table.


garrow_table_add_column ()

GArrowTable *
garrow_table_add_column (GArrowTable *table,
                         guint i,
                         GArrowColumn *column,
                         GError **error);

Parameters

table

A GArrowTable.

 

i

The index of the new column.

 

column

The column to be added.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly allocated GArrowTable that has a new column or NULL on error.

[nullable][transfer full]

Since: 0.3.0


garrow_table_remove_column ()

GArrowTable *
garrow_table_remove_column (GArrowTable *table,
                            guint i,
                            GError **error);

Parameters

table

A GArrowTable.

 

i

The index of the column to be removed.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly allocated GArrowTable that doesn't have the column or NULL on error.

[nullable][transfer full]

Since: 0.3.0


garrow_table_replace_column ()

GArrowTable *
garrow_table_replace_column (GArrowTable *table,
                             guint i,
                             GArrowColumn *column,
                             GError **error);

Parameters

table

A GArrowTable.

 

i

The index of the column to be replaced.

 

column

The newly added GArrowColumn.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The newly allocated GArrowTable that has column as the i -th column or NULL on error.

[nullable][transfer full]

Since: 0.10.0

Types and Values

GARROW_TYPE_TABLE

#define GARROW_TYPE_TABLE (garrow_table_get_type())

struct GArrowTableClass

struct GArrowTableClass {
  GObjectClass parent_class;
};