xxxxxxxxxx
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}
xxxxxxxxxx
import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
xxxxxxxxxx
import pandas as pd
pd.set_option('display.max_colwidth', None)#None, # or value like: 1500, 400 ...
xxxxxxxxxx
# displays max number of columns and rows
import pandas as pd
pd.options.display.max_rows = 999
pd.options.display.max_columns = 999
xxxxxxxxxx
upvote if u've been studing french for 12 years and u still need google traduction
xxxxxxxxxx
root@NagiosDebian:/home/nagios/downloads# wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.2.tar.gz
--2018-11-23 10:16:53-- https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.2.tar.gz
Résolution de assets.nagios.com (assets.nagios.com)…2600:3c00::f03c:91ff:fedf:b821, 72.14.181.71
Connexion à assets.nagios.com (assets.nagios.com)|2600:3c00::f03c:91ff:fedf:b821|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 11301454 (11M) [application/x-gzip]
Sauvegarde en : `nagios-4.4.2.tar.gz`
nagios-4.4.2.tar.gz 100%[==============================================================>] 10,78M 956KB/s in 13s
2018-11-23 10:17:06 (880 KB/s) — `nagios-4.4.2.tar.gz` sauvegardé [11301454/11301454]