# check if the file is not empty and get size import os def is_empty_file(fpath): return os.path.isfile(fpath) and os.path.getsize(fpath) > 0 fp="/content/sample_data/california_housing_test.csv" emp_status= is_empty_file(fp) print(emp_status)