Skip to content

Instantly share code, notes, and snippets.

@CarlKCarlK
Created September 28, 2020 22:18
Show Gist options
  • Save CarlKCarlK/f6607ba8fe5d319206297bb339938ee1 to your computer and use it in GitHub Desktop.
Save CarlKCarlK/f6607ba8fe5d319206297bb339938ee1 to your computer and use it in GitHub Desktop.
import pandas as pd
df1 = pd.DataFrame([['a',2,True],
['b',3,False],
['c',1,False]],
columns=['alpha','num','class'])
df1.set_index(['alpha'],inplace=True)
df1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment