Skip to content

How can I get a specific value from a pandas DataFrame?

I have a .df that looks something like this(df = pandas.read_csv(main_db)): itemName itemBrand itemCode itemStock some name some brand a 6 digit number some low number even more names even more brands nore 6-digit numbers more stocks Looks like that but with actual names and brands. Now if I use result = df[d…

How to get rid of the row numbers, to_csv?

after predicting the target value for the classification problem trying to get the predicted values in a .csv file along with the id of particular data instance but getting the unnecessary row numbers. x_test.head() image to.csv() image Answer You index=False , doc specifies this argument