Answers for "print index of the dataframe"

0

print index of certain value in dataframe

print(df[df[‘Name’]==’Donna’].index.values)
Posted by: Guest on July-21-2021
2

how to get index of pandas dataframe python

import pandas as pd

df = pd.DataFrame(
    [[88, 72, 67],
    [23, 78, 62],
    [55, 54, 76]],
    index=[2, 4, 9],
    columns=['a', 'b', 'c'])

index = df.index
print(index)
Posted by: Guest on August-05-2021

Code answers related to "print index of the dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language