home << dhlab reference << dhlab.text.dhlab_object

DhlabObj#

from dhlab.text.dhlab_object import DhlabObj
class DhlabObj(frame=Empty DataFrame Columns: [] Index: [])[source]#

Bases: ABC

DHLAB base class

Provides shared utility methods to DHLAB classes.

classmethod from_csv(path)[source]#

Import corpus from csv

abstract from_df(df)[source]#

Typecast Pandas DataFrame to dhlab class

head(n=5)[source]#

Return first n rows

make_subset(row_slice, col_slice)[source]#

Return a subset of the dataframe

sort(by=None, asc=False)[source]#

Sort by column

tail(n=5)[source]#

Return last n rows

to_csv(path)[source]#

Write to csv

to_excel(path)[source]#

Write to excel

property loc#
property size#

Return number of rows in dataframe