Is it possible when creating a dataframe from a list, to set the index as one of the values?
import pandas as pd tmp = [[\'a\', \'a1\'], [\'b\',\' b1\']] df =
If you don't want index name:
df = pd.DataFrame(tmp, columns=["First", "Second"], index=[i[0] for i in tmp])
Result:
First Second a a a1 b b b1