I managed to store 500 csv's file into array, each csv has columns:
time_s|hbaro_m|hdot_1_mps|hralt_m|lon_rad|lat_rad|tas_mps|gs_mps|wow|chi_rad|lap_te_pos|
| | | | | | | | | |
where each column has about 5k to 10k rows of data.
Using this code
# import necessary libraries
import pandas as pd
import os
import glob
# use glob to get all the csv files
# in the folder
path = os.getcwd()
csv_files = glob.glob(os.path.join(path, "*.csv"))
# loop over the list of csv files
df = [0 for i in range(500)]
for i in range (500):
# read the csv file
df[i]= pd.read_csv(csv_files[i])
I get the output an array in which each array has the array of each csv (I don't know how to explain this actually)
Like
df[1] = csv1,
df[2] = csv2
etc
I want to modify and swap the columns (lon_rad
, lat_rad
) later, is this possible and how?
Thanks in advance