I have two DataFrames (1) fruit, and (2) market. Both have three rows denoted 0,1,2 and only one column with no header.
print fruit
0 apple
1 pear
2 melon
print market
0 apple
1 pear
2 melon
I would like to to print the index in integers and tried below but have hard time in
print market.iloc[np.where(fruit[0] == market)].index
Int64Index([0], dtype='int64')
print market.iloc[np.where(fruit[0] == market)].index.tolist
<bound method Int64Index.tolist of Int64Index([0], dtype='int64')>
print market.iloc[np.where(fruit[0] == market)].index.values
[0]
print market.iloc[np.where(fruit[0] == market)].index.get_values
<bound method Int64Index.get_values of Int64Index([0], dtype='int64')>
What should I do to print 0 only without the brackets? Goal: 0
nosec_db.iloc[np.where(nosec_tmplt[0] == nosec_db)].index.tolist()