Created
September 15, 2018 17:29
-
-
Save zinyosrim/2573c0ce98df6a9b0fa736bd6ba931e0 to your computer and use it in GitHub Desktop.
Pretty Print all data frame rows and columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
def pprint_full(x): | |
pd.set_option('display.max_rows', len(x)) | |
pd.set_option('display.max_columns', None) | |
pd.set_option('display.width', 2000) | |
pd.set_option('display.float_format', '{:20,.2f}'.format) | |
pd.set_option('display.max_colwidth', -1) | |
#print(x) | |
pprint.pprint(x) | |
pd.reset_option('display.max_rows') | |
pd.reset_option('display.max_columns') | |
pd.reset_option('display.width') | |
pd.reset_option('display.float_format') | |
pd.reset_option('display.max_colwidth') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment