I have a python script that runs a series of checks on a pandas dataframe, and prints the results of each check. The code behind each check looks a bit like this:
if sum(df["column1"]) >0:
print("Success")
else:
print("Failure")
What I want to do is save the results to a csv file with each result in its own cell, so that the csv looks like this:
Success
Success
Failure
Success
Failure
Does anyone know how to do this please?