Skip to content

Instantly share code, notes, and snippets.

@zinyosrim
Created September 15, 2018 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zinyosrim/2573c0ce98df6a9b0fa736bd6ba931e0 to your computer and use it in GitHub Desktop.
Save zinyosrim/2573c0ce98df6a9b0fa736bd6ba931e0 to your computer and use it in GitHub Desktop.
Pretty Print all data frame rows and columns
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