python - returned objects by read_csv in Pandas -
i using read_csv
method in pandas input multiple .csv files. print out objects returned read_csv
, , curious differences in output:
for example, 1 printout is:
<class 'pandas.core.frame.dataframe'> int64index: 10 entries, 0 9 data columns (total 5 columns): col_1 10 non-null values col_2 10 non-null values col_3 10 non-null values col_4 10 non-null values col_5 10 non-null values dtypes: int64(5)
while 1 simply:
col_a col_b col_c col_d col_e col_f 0 1 1 1 183227 1 181913 1 2 1 1 183234 1 183003 ...
how should interpret differences in these outputs? why second file not result in dataframe
object?
they both dataframes. if output longer few rows, pandas displays summary information in first format won't fill screen.
if want full display, can use .to_string()
method on dataframe. is, if df
, dataframe, can print df.to_string()
see data, if it's long.
Comments
Post a Comment