I'm using an excel document with 5000 rows and 37 columns to get it formatted to a level where a third part software can accept the file without any problems.
Programming in PyCharm PoorPeople Edition
The problem is simple:
If Column_value = "XYZ": excel.write(Custom Data if True) else: excel.write(Custom Data if Else)
I've been trying to solve this problem for some time now and I really can't wrap my head what am I doing wrong.
Importing the data:
excel = xlsxwriter.Workbook('excel_file.xlsx')
File is now ready for formatting, lets to this:
Plant_EquipmentProperty = excel.dropna(subset=['Description']) #ignore anything that doesn't have Description
The next stage is to remove a row if a column has a specific string in it and everything I tried so far had no results (including stack overflow ideas) which were:
The problem ~df.C.str.contains("XYZ") = does not compile and includes every single column
The problem - just doesn't work at all
The problem - .line_race is not a thing anymore
The Problem - it's looking for null and not specifics
etc.
I've tried a numerous things and nothing seems to be as simple as if column XYZ is equal to "ABC" get rid of it.
What am I doing wrong?