import pandas as pd
import argparse


parser = argparse.ArgumentParser(description='Process some directory.')
parser.add_argument('dirr', type=str, help='The directory to read from')

args = parser.parse_args()

dirr = args.dirr
df = pd.read_csv(f'{dirr}/Serial-Capture-Data.data', header=0)

data_df = df[['# Time (seconds)', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7']]

label_df = df[['# Time (seconds)', 'f8']]

data_df.to_csv(f'{dirr}/{dirr}_data.data', index=False)
label_df.to_csv(f'{dirr}/{dirr}_label.data', index=False)
