pd.get_option('display.max_rows') pd.get_option('display.max_columns') pd.set_option('display.max_rows', None) pd.set_option('display.max_columns', None)
df = pd.read_csv('sample.csv')
df.replace({'n':0, 'y':1}) df[df['a'] == 'y'].sort_values(by='b') df[(df['a'] == 'y') & (df['b'].notnull())].sort_values(by='c') df.loc[df['a'] == 0, ['b']] = 1 df['a'].notnull() * 1