I have a sensor data output that has the following structure:
--- Home ---
$ LAGM, Colar03, Yellow, 32262, -31226, -5120, -104,40,190,1662.00,1670.00,236.00, MGAL $ GPGGA, 113203,181,206,6812, S, 05443,4264, W, 1,03,3,4,0,0, M, 4.8, M , 0000 * 68 $ GPGSA, A, 2.07,23,30 , 3,5,3,4,0,9 * 3E 0.15 0.05 $ GPGSV, 3,3,12,02,10,263,24,05,05,218,28,16,00,146, 27,00,118, * 70 $ GPRMC, 113203181, A, 2026.6812, S, 05443.4264, W, 000.0.000.0,241017 , A * 63 $ GPVTG, 000.0, T , M, 000.0, N, 000.0, K, A * 0D
--- End ---
Where information in the Pandas DataFrame is positioned sequentially, such as a table and its records. It turns out that the sensor, in some blocks of code, simply did not register some data, leaving with missing information, according to the following block:
--- Home ---
$ LAGM, Colar03, Yellow, 6.27904,6144,332, -172, -216,1536,109.24, MGAL $ GPGGA, 120025.0, N, O, E, 0.0.0.0, M, O, MŽÆF|F & $ GPRMC, 120025, V, 0, N, 0, E, 0.0.280606 , N * 78 $ GPVTG, 0, T , M, 0, N, 0, K, N * 02
--- End ---
You may notice missing information as well as the existence of non-ASCII characters (this is another treatment). My main contribution in the Master is preprocessing, where it consists of retrieving these missing lines and placing a mean between the values, rescuing the lost information.
However, in excel it is possible to execute this "in the arm" according to the animated gif below:
Where it drags the existing records down so we can add new data to the created lines, but I could not find a way to add this information to Pandas just like the image.
I would like to know, is it possible to perform this action by inserting a line with new information in Pandas with some function or even bypassing it with Python?