Question

In Python, how to create an empty DataFrame with row names (i.e. labels)?


Annonce
Ad

Answer

>>> import pandas as pd
>>> df = pd.DataFrame(index = ['R1', 'R2', 'R3', 'R4'])


[source]
# ID Query