I am trying to rename my columns from a df exported from pandas by doing a Header array like this.
Header_1 = [ 'Time', 'Tx/Rx', 'Channel', 'ID', 'Bits', 'A', 'B' ]
Frame_1 = Frame_1.rename(columns = Header_1)
but I get the following TypeError: 'list' object is not callable
I know that I can name my headers directly from pandas as:
df = pd.read_csv('df.txt', header = 15, sep=' ',
                    names = ['Time', 'Tx/Rx', 'Channel', 'ID', 'Bits', 'A', 'B'])
but because my df is split into 2 different bytes with different IDs I exported the df and made two dfs, one for each byte frame by the name of the ID. They are like this:
14:12:59:0190   Rx        1     0010    8   185    0.0     
14:12:59:2150   Rx        1     0011    8   138    184.0
14:12:59:4110   Rx        1     0010    8   185    0.0
14:12:59:6070   Rx        1     0011    8   135    184.0
14:12:59:8030   Rx        1     0010    8   185    0.0
14:12:59:9990   Rx        1     0011    8   135    184.0
And want them like this:
     Time      Tx/Rx   Channel   ID   Bits   A       
14:12:59:0190   Rx        1     0010    8   185   0.0      
14:12:59:4110   Rx        1     0010    8   185   0.0
14:12:59:8030   Rx        1     0010    8   185   0.0
     Time      Tx/Rx   Channel   ID   Bits   B 
14:12:59:2150   Rx        1     0011    8   138  184.0
14:12:59:6070   Rx        1     0011    8   135  184.0
14:12:59:9990   Rx        1     0011    8   135  184.0
And I split them like this:
Frame_1 = df.loc[df['ID'] == '0010']
Frame_2 = df.loc[df['ID'] == '0011']
So now I have the proper df for each "ID" but I cannot name the headers accordingly for each byte :(
 
     
     
     
    