gusbacos / SUEWS_DB_Typology_test

Testing SUEWS DB/Spartacus for upcoming paper
1 stars 0 forks source link

Issue with NAN in regression #5

Closed sunt05 closed 8 months ago

sunt05 commented 8 months ago

On anther note. I am trying to put in regression line, equation and r2 but my old code does not work if you have nodata values. Du you have any suggestion/Code?

_Originally posted by @biglimp in https://github.com/gusbacos/SUEWS_DB_Typology_test/issues/1#issuecomment-2004439259_

sunt05 commented 8 months ago

Usually I just drop the nan values before regression - put data into a pandas dataframe, clean it by dropping nan and then use the scipy function for regression.

(On mobile/commuting now so cannot code - if you can show me your old code, I may give you some quick feedback in this thread.)

biglimp commented 8 months ago

I fixed it by creating a new dataframe, thanks.