I already imported the csv files into python. The problem with append is when I plot it, the second file did not start from the top but continues from the last point of the first file. Here, let me show you the code and the figure.
import os
import pandas as pd
import matplotlib.pyplot as plt
### Set your path to the folder containing the .csv files
PATH = "D:\\TUGAS\\TA\\TUYS\\Data TA dari Garuda\\Format CSV\\Hard Landing\\Format 1"
### Fetch all files in path
fileNames = os.listdir(PATH)
### Filter file name list for files ending with .csv
#fileNames = [file for file in fileNames if '.csv' in file]
TES = pd.Series([])
X = pd.Series([])
### Loop over all files
for file in fileNames:
### Read .csv file and append to list
df = pd.read_csv( file, skiprows=[0,1,3,4])
df.columns = [column.replace(" ","_") for column in df.columns]
df.columns = [column.replace("/","_") for column in df.columns]
X = X.append(df)
TES = TES.append(X)
### Create line for every file
plt.plot(TES.DISTANCE_TO_THRESHOLD, TES.ALTITUDE_ABOVE_FIELD_ELEV)
plt.ylabel("Altitude (ft)")
plt.xlabel("Distance from threshold (nm)")
plt.xlim(5,-2)
plt.ylim(-50,1000)
### Generate the plot
plt.show()
The figure :
and the figure supposed to look like this (in reverse)
Any ideas how to correct it?

