Output¶
Print to screen¶
Functions for printing to screen in a nice format.
-
tabledataextractor.output.print.
as_string
(table)[source]¶ Returns table as string for printing.
Parameters: table (numpy.array) – input numpy array Returns: string
-
tabledataextractor.output.print.
list_as_PrettyTable
(table_list)[source]¶ Turns list into
PrettyTable
object, ready for printing.Parameters: table_list – list to be printed Returns: table as PrettyTable
Save to file¶
Outputs the table to cvs.
Convert to Pandas DataFrame¶
Outputs the table to a Pandas DataFrame.
-
tabledataextractor.output.to_pandas.
build_category_table
(df)[source]¶ Builds the category table in form of a Python list, from Pandas DataFrame input
Parameters: df (pandas.DataFrame) – Pandas DataFrame input Returns: category_table as Python list
-
tabledataextractor.output.to_pandas.
find_multiindex_level
(row_number, column_number, df)[source]¶ Helping function for
_build_category_table()
. Finds the Pandas MultiIndex level in a given Pandas DataFrame, for a particular data value.