I am trying to store the output of if condition to a Dataframe. Given below is what I am trying:
import os
filename = "Desktop/sales/10-05-2018"
#check file exists
if(os.path.exists(filename)):
print("Files received")
else:
print("No files received")
Instead of printing the output, I would like to store the output to a Dataframe. Could anyone advice on this. Thanks.