I have a CSV file with a bunch of different rows, say the row labels are width, length, height, etc. with about 50 cells of integers that correspond to the correct value below each of those in columns. the labels for the columns could be rectangle, square, etc.
Say for this example the rectangle is missing the width, but it has the height and length, and the square is missing the length and height, I want to make a python script to print out
square, length, height
rectangle, width
and so on obviously if there were 40 more shapes missing some data
in the csv file, the data is blank, theres no NULL I believe it would be something like the below
import pandas as pd
data = pd.read_csv('shapes.csv')
# Filter the data accordingly.
data = data[data['width'] > 0]
data = data[data['row'] == 'width']
I believe this would cycle through just width? I want it to check for an width, if theres a width integer, GREAT, skip to the next column and look for length... and so on. Thank you in advance!
