show more columns / rows of a Pandas DataFrame
import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
show more columns / rows of a Pandas DataFrame
import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
set dtype for multiple columns pandas
import pandas as pd
df = pd.DataFrame({'id':['a1', 'a2', 'a3', 'a4'],
'A':['0', '1', '2', '3'],
'B':['1', '1', '1', '1'],
'C':['0', '1', '1', '0']})
df[['A', 'B', 'C']] = df[['A', 'B', 'C']].apply(pd.to_numeric, axis = 1)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us