checkpoint
This commit is contained in:
parent
97c96ed0fc
commit
084ddc26d3
@ -33,6 +33,14 @@ def write_to_csv(legislation_data, csv_file):
|
||||
flattened_legislation.append(flattened_item)
|
||||
|
||||
df = pd.DataFrame(flattened_legislation)
|
||||
|
||||
# Debugging: Print the first few entries of the DataFrame to inspect its structure
|
||||
print("Debugging DataFrame:")
|
||||
if not df.empty:
|
||||
print(df.head())
|
||||
else:
|
||||
print("DataFrame is empty.")
|
||||
|
||||
if df.empty:
|
||||
neo4j_logger.warning(f"No data to write to CSV file: {csv_file}")
|
||||
print("DataFrame is empty. Debugging information:")
|
||||
@ -40,10 +48,6 @@ def write_to_csv(legislation_data, csv_file):
|
||||
print(json.dumps(item, indent=4))
|
||||
return
|
||||
|
||||
# Debugging statement to check DataFrame contents
|
||||
print("DataFrame contents:")
|
||||
print(df.head())
|
||||
|
||||
df.to_csv(csv_file, index=False)
|
||||
neo4j_logger.info(f"Data written to CSV file: {csv_file}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user