Skip to content
Advertisement

Python pandas printing correct dataframe

I am reading from a csv-file, and have the current values in my dataframe, where width and height is min and max value.

JavaScript

And now i want to split and format the columns and print them:

JavaScript

My problem is that it stills print:

JavaScript

Whereas I want it to print:

JavaScript

What am I doing wrong?

Advertisement

Answer

This code can help you ,

JavaScript

The df will be,

JavaScript

please let me know if that helps you !! Also, I am open to optimized suggestions!!

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