pandas df index values

Solutions on MaxInterview for pandas df index values by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "pandas df index values"
Max
28 Oct 2016
1df = pd. read_csv("fruits.csv")
2print(df)
3index = df. index.
4condition = df["fruit"] == "apple"
5apples_indices = index[condition] get only rows with "apple"
6apples_indices_list = apples_indices. tolist()
7print(apples_indices_list)