How to find a P-value from a t-score in Python
two-tailed test (use this for a regression, see below)
script.stats.t.sf(abs(t), df) * 2
t: t-statistic
df: n-k
k: the total number of independent variables = # explanatory variables + 1 (for target variable).
n: the number of observations
one-tailed test
script.stats.t.sf(abs(t), df)
t: t-statistic
df: n-k