feaet: now cycles through wanted files

This commit is contained in:
Leonard Excoffier
2024-08-31 15:41:33 -04:00
parent f31d901201
commit 3a60674b7c

View File

@@ -1,7 +1,18 @@
import pandas as pd import pandas as pd
# Define a list of file paths for easy modification
file_paths = [
'sec_data/2024q1/num.txt',
'sec_data/2024q1/pre.txt',
'sec_data/2024q1/sub.txt',
'sec_data/2024q1/tag.txt'
]
# Loop through each file and perform analysis
for i, file_path in enumerate(file_paths):
print(f"\nAnalyzing {file_path} (File {i+1}/4)...")
# Read the data into a Pandas DataFrame # Read the data into a Pandas DataFrame
file_path = 'sec_data/2024q1/tag.txt'
df = pd.read_csv(file_path, sep='\t') df = pd.read_csv(file_path, sep='\t')
# Inspect the DataFrame # Inspect the DataFrame