-
-
Save loopingleo/1cf0c9dfba4a2e4e1c51c3d443d01ff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, glob | |
import pandas as pd | |
# read multiple files with SensorLog data | |
# adjust to your directory - I use iCloud directory on my Mac | |
path = os.path.expanduser("~/Library/Mobile Documents/com~apple~CloudDocs/SensorLogData") | |
allFiles = glob.glob(path + "/*.csv") | |
frame = pd.DataFrame() | |
list_ = [] | |
# read all files in directory | |
for file_ in allFiles: | |
df = pd.read_csv(file_, index_col=None, header=0) | |
list_.append(df) | |
# concat all files into one DataFrame | |
df_sensorData = pd.concat(list_, sort=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment