Skip to content
Advertisement

Remove name, dtype from pandas output of dataframe or series

I have output file like this from a pandas function.

JavaScript

I’m trying to get an output with just the second column, i.e.,

JavaScript

by deleting top and bottom rows, first column. How do I do that?

Advertisement

Answer

You want just the .values attribute:

JavaScript

You can convert to a list or access each value:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement