input: Write a function to convert a dataframe to a pivot table.
  assert dataframe_to_table(pd.DataFrame({'A': [1, 2], 'B': [3, 4]})).equals(pd.DataFrame({1: {'A': 1, 'B': 3}, 2: {'A': 2, 'B': 4}}))
  assert dataframe_to_table(pd.DataFrame({'X': [5, 6], 'Y': [7, 8]})).equals(pd.DataFrame({5: {'X': 5, 'Y': 7}, 6: {'X': 6, 'Y': 8}}))
  assert dataframe_to_table(pd.DataFrame({'W': [9, 10], 'Z': [11, 12]})).equals(pd.DataFrame({9: {'W': 9, 'Z': 11}, 10: {'W': 10, 'Z': 12}}))
output: def dataframe_to_table(df):
      return df.set_index(df.columns[0]).T