morpheus.io.deserializers#

DataFrame deserializers.

Functions

get_reader(file_type, df_type)

read_file_to_df(file_name[, file_type, ...])

Reads a file into a dataframe and performs any of the necessary cleanup.

get_reader(file_type, df_type)[source]#
read_file_to_df(
file_name,
file_type=<FileTypes.Auto: 0>,
parser_kwargs=None,
filter_nulls=True,
filter_null_columns='data',
df_type='pandas',
)[source]#

Reads a file into a dataframe and performs any of the necessary cleanup.

Parameters:
file_namestr

File to read.

file_typemorpheus.common.FileTypes

Type of file. Leave as Auto to determine from the extension.

parser_kwargsdict, optional

Any argument to pass onto the parse, by default {}. Ignored when C++ execution is enabled and df_type="cudf"

filter_nullsbool, optional

Whether to filter null rows after loading, by default True.

filter_null_columnslist[str]|str, default = ‘data’

Column or columns to filter null values from. Ignored when filter_null is False.

df_typetyping.Literal[“cudf”, “pandas”], optional

What type of parser to use. Options are ‘cudf’ and ‘pandas’, by default “pandas”.

Returns:
DataFrameType

A parsed DataFrame.