I’m working with Python for the first time so I’ve few difficulties.
I’ve a csv file of data with 6 columns and 20 rows, some entries are ‘NaN’. What I’m trying to do is an interaction that would consider the first column vs the others (A vs B,C,D,E and F), then the second column with all the others (B vs C,D,E and F) etc (i.e compare every possible pair of the 6 columns), for each pair remove the NaN entries (so the number of rows for each final pair would be different) and calculate the linear regression.
I can obtain the results I’m looking for by considering each pair “manually”, but since I’ve quite a lot of DataFrames for which I’ve to do this procedure, it’d take a lot of time, so I’m hoping someone would help me with a faster method.
what I’m able to do is:
how do I iterate these two commands for every possible pair of columns?
Thank you so much.