import pandas as pd pd.set_option('display.max_colwidth', None)#None, # or value like: 1500, 400 ...import pandas as pd pd.set_option('display.max_rows', 10) pd.set_option('display.max_columns', 50) pd.set_option('display.width', 1500)import pandas as pd import numpy as np df = pd.DataFrame({'A': ['abc', 'de', 'abcd'], 'B': ['a', 'abcde', 'abc'], 'C': [1, 2.5, 1.5]}) measurer = np.vectorize(len) # All Columns res1 = dict(zip(df, measurer(df.values.astype(str)).max(axis=0))) {'A': 4, 'B': 5, 'C': 3} # Columns that only data type = object df_object = df.select_dtypes(include=[object]) res2 = dict(zip(df_object, measurer(df_object.values.astype(str)).max(axis=0))) {'A': 4, 'B': 5}res1 = dict(zip(df, measurer(df.values.astype(str)).max(axis=0))) {'A': 4, 'B': 5, 'C': 3} df_object = df.select_dtypes(include=[object]) res2 = dict(zip(df_object, measurer(df_object.values.astype(str)).max(axis=0))) {'A': 4, 'B': 5}