Pandas Printing ALL Dtypes
This seems like a very simple problem, however it's driving me round the bend. I'm sure it should be solved by RTFM, but I've looked at the options and I can see the one to fix it.
Solution 1:
I tried this and worked:
df.info(verbose=True)
Solution 2:
another way around is to group by dtype as follows:
x = df.columns.to_series().groupby(df.dtypes).groups
x
{dtype('object'): ['Date', 'Selection', 'Result'], dtype('float64'): ['profit', 'PL', 'cumPL']
Solution 3:
Do this:
with pd.option_context('display.max_rows', None, 'display.max_columns', None):
print(df.dtypes)
Post a Comment for "Pandas Printing ALL Dtypes"