Skip to content
Advertisement

Create a List in Python from Value of Max Data

I want to create a list in Python from the dataset below:

JavaScript

With some data wrangling by transposing the data to convert the value with this code:

JavaScript

The data frame look like this: enter image description here

For example,

JavaScript

Final result that I expected should be a list that consists a maximum value from each column:

JavaScript

Advertisement

Answer

You can try this:

JavaScript

Output:

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