Skip to content

Instantly share code, notes, and snippets.

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