I have the following pandas data frame where I have NDVI value of 5 different points on different dates-
print (df) >>> PSC Intel FID Lat Lon 23-May 18-May 25-May 28-May 0 51.62 -63.81 -0.04 0.08 0.10 0.13 1 51.62 -63.80 -0.05 0.09 0.10 0.13 2 51.62 -63.80 -0.05 0.08 0.07 0.12 3 51.62 -63.80 -0.06 0.08 0.11 0.14 4 51.62 -63.80 -0.05 0.09 0.11 0.16 However, I need them converted where NDVI value will be stacked, and a new column will be there to indicate the data collection date. The required format is as follows -
FID Lat Lon NVAL Date SAT 0 51.62 -63.81 -0.04 23-May PSC 1 51.62 -63.80 -0.05 23-May PSC 2 51.62 -63.80 -0.05 23-May PSC 3 51.62 -63.80 -0.06 23-May PSC 4 51.62 -63.80 -0.05 23-May PSC 0 51.62 -63.81 0.08 18-May PSC 1 51.62 -63.80 0.09 18-May PSC 2 51.62 -63.80 0.08 18-May PSC 3 51.62 -63.80 0.08 18-May PSC 4 51.62 -63.80 0.09 18-May PSC 0 51.62 -63.81 0.10 25-May Inter 1 51.62 -63.80 0.10 25-May Inter 2 51.62 -63.80 0.07 25-May Inter 3 51.62 -63.80 0.11 25-May Inter 4 51.62 -63.80 0.11 25-May Inter 0 51.62 -63.81 0.13 28-May Inter 1 51.62 -63.80 0.13 28-May Inter 2 51.62 -63.80 0.12 28-May Inter 3 51.62 -63.80 0.14 28-May Inter 4 51.62 -63.80 0.16 28-May Inter Is there any way to do that using the pandas or any other library of python?