Hi kind of new to pandas. I am currently trying to copy a row based on an index from one dataframe to a second dataframe at a specified column within it. It successfully copies the column with all data, however it is missing the first value. I am unsure why the first value does not appear and was wondering if someone had insight on it. Here is my code below
import fileinput, sys, re, time, os
import pandas as pd
import numpy as np
"Create a blank dataframe with necessary column headers"
columnNames = ["Settings 1 Values", "Settings 2 Values", "CPU Address", "FPGA Address", "Delta", "Register Name", "R/W Status"]
output = pd.DataFrame(columns = columnNames)
print(output)
"Fill values from first settings into output dataframe"
df1 = pd.read_csv("50MHzWholeFPGA.csv")
output.loc["Settings 1 Values"] = df1.iloc[:, 0]
The output is as follows
Settings 1 Values Settings 2 Values ... Register Name R/W Status
0 46 16 ... NaN NaN
1 9047 46 ... NaN NaN
2 9047 9047 ... NaN NaN
3 31168 9047 ... NaN NaN
4 8 31168 ... NaN NaN
... ... ... ... ...
49146 9047 9047 ... NaN NaN
49147 9047 9047 ... NaN NaN
49148 9047 9047 ... NaN NaN
49149 9047 9047 ... NaN NaN
49150 9047 9047 ... NaN NaN
As you can see in the settings 1 column, it starts at 46, where the first value is actually 16 like in the settings 2 column