Pandas
Display complete dataframe
with pd.option_context('display.max_rows', None, 'display.max_columns', None):
display(tt)
with pd.option_context('display.max_rows', None, 'display.max_columns', None):
print(tt)
Select or remove rows
by index
# select
= df.loc[index]
row # remove
=True)
df.drop(indices, inplace= df.drop(indices) df
by logical expression
# select
= df[logical]
df # remove
= df[not logical] df
logical
should be a Series
of type bool
with index matching df
.
Select or remove columns
# select
= tt[list_of_column_names] tt