Pandas

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

Daiphys is a professional-service company for research and development of leading-edge technologies in physics and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!

Name*


Email*


Message*


* Indicates required field

Daiphys Technologies LLC - https://www.daiphys.com/

  • Last modified: 2024/07/16 05:50
  • by Daiphys