Skip to content

Instantly share code, notes, and snippets.

@akanik
Last active May 10, 2022 17:33
Show Gist options
  • Save akanik/153898dcc74c7bbd593caa41243a37e5 to your computer and use it in GitHub Desktop.
Save akanik/153898dcc74c7bbd593caa41243a37e5 to your computer and use it in GitHub Desktop.
basepath = '../data/restaurant-violations/csv/'
df_list = []
for filename in os.listdir(basepath):
filepath = os.path.join(basepath, filename)
print(filepath)
if filename.endswith('.csv'):
df = pd.read_csv(filepath)
df_list.append(df)
df_combo = pd.concat(df_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment