Output data from all columns in a dataframe in pandas
Output data from all columns in a dataframe in pandas
Suppose the output data of all columns should be displayed though it will not fit in the screen:
print paramdata.values
The above code using matrix representation converts the dataframe to the numpy array:
paramdata.columns
The column names can be stored using the above code
paramdata.index
The row names can be stored using the above code.
Use the function to_csv() and stdout:
import sys paramdata.to_csv(sys.stdout)
The above code displays the whole dataframe though it may not be nice though the function to_csv() can be used to set the parameters for column separator:
One can also use .to_csv() and initialise it to None.
paramdata.to_csv(None)