How to store the result of df.count() as a new dataframe in Pandas?
tjandacw at gmail.com
Wed Oct 27 06:25:29 EDT 2021
On Tue, Oct 26, 2021 at 6:36 PM Shaozhong SHI <shishaozhong at gmail.com>
> The result of df.count() appears to be a series object. How to store the
> result of df.count() as a new dataframe in Pandas?
> That is data anyhow.
Have you tried something like
df_count = pd.DataFrame(df.count())
(Untested, but I've converted Series objects to DataFrames doing something
This is more of a pandas question. Why don't you ask this on stackoverflow?
More information about the Python-list