0

I try use:

df_bm = pd.df_bm('player': [1, 2])

but appears

File "<ipython-input-36-adaefa2ccfb5>", line 1
df_bm = pd.df_bm('player': [1, 2])
                         ^
SyntaxError: invalid syntax
gtomer
  • 5,643
  • 1
  • 10
  • 21
  • Welcome to StackOverflow. Please check the documentation at https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.set_index.html. You should use `df_bm.set_index(keys)` (where keys could be ['colname1', 'colname2']) . set_index will take both a single column name and a list of multiple column names. – rajah9 Jun 13 '22 at 13:55
  • Does this answer your question? [Could pandas use column as index?](https://stackoverflow.com/questions/38542419/could-pandas-use-column-as-index) – rajah9 Jun 13 '22 at 13:57

0 Answers0