I'm trying to add a list as a row in a Dataframe, and I wanted to know why this solution doesn't work:
Bp = ["Nose", "Neck", "RShoulder", "RElbow", "RWrist",
"LShoulder", "LElbow", "LWrist", "MidHip", "RHip", "RKnee",
"RAnkle", "LHip", "LKnee", "LAnkle", "REye", "LEye", "REar",
"LEar", "LBigToe", "LSmallToe", "LHeel", "RBigToe", "RSmallToe",
"RHeel"]
BpDisp = pd.DataFrame(columns = Bp)
infoPos= [1001.36, 1001.33, 924.677, 886.404, 895.2239999999999, 1089.41, 1118.83, 1118.96, 1007.08, 954.15, 974.779, 977.5219999999999, 1065.85, 1057.14, 1048.4, 983.533, 1024.7, 954.227, 1048.26, 1060.1, 1077.74, 1045.23, 968.803, 951.097, 983.503]
to_add = pd.Series(infoPos, index = BpDisp.columns)
BpDisp.append (to_add, ignore_index = True)
I'm getting as result an empty Dataframe:
Empty DataFrame
Columns: [Nose, Neck, RShoulder, RElbow, RWrist, LShoulder, LElbow, LWrist, MidHip, RHip, RKnee, RAnkle, LHip, LKnee, LAnkle, REye, LEye, REar, LEar, LBigToe, LSmallToe, LHeel, RBigToe, RSmallToe, RHeel]
Index: []