# How to test for statistical independence on non-stationary time series?

I have multiple time series on which I want to identify statistically significant (if any) trends. To that end, I started by conducting the Augmented Dickey Fuller (ADF) test to identify which series are not stationary (thus implying an underlying trend):

Augmented Dickey-Fuller Test (p-value):
#0: 0.7400121258386816 -> (not stationary)
#1: 0.003756531421338549 -> (stationary)
#2: 0.8356431503570756 -> (not stationary)
#3: 1.2618571533446908e-07 -> (stationary)


In order to identify relevant monotonic trends, I want to conduct the Mann-Kendall test, but I need to ensure that samples are independent and not serially correlated. ACF/PACF analysis on the time series suggest/are influenced by trends, and therefore require de-trending transformations to achieve stationarity:

However, I'm struggling on 1) how to detrend non-stationarity series - using gradient vs difference; It should be noted I'm not trying to model the trend at this stage (as I'm not yet sure a trend exists) and can't perform correlation analysis on the residuals without making assumptions on an underlying model.

Additionally, I'm unsure about 2) which analysis tool to use: ACF, PACF or the Ljung-Box test? I am getting very different results with each:

Ljung-Box Test (p-value):
1   5.832414e-06  0.652845  0.130720  0.023136  0.649813  0.000918  6.256156e-05  0.692498  0.036099  0.574666  0.882558  0.001247
2   2.251164e-08  0.005893  0.030928  0.004227  0.027847  0.003637  1.582695e-06  0.003751  0.056359  0.825435  0.090845  0.004315
3   1.014388e-10  0.012420  0.038536  0.001468  0.035400  0.010453  8.091142e-08  0.008257  0.123269  0.895700  0.187108  0.012288
4   2.102519e-12  0.011219  0.049601  0.001637  0.072348  0.022559  6.321557e-09  0.018818  0.215027  0.789189  0.262034  0.021165
5   2.409707e-13  0.005992  0.051696  0.002315  0.109543  0.032003  6.076601e-10  0.026010  0.273688  0.854404  0.367491  0.028546
6   5.651045e-14  0.004371  0.040586  0.002245  0.151084  0.044142  4.085782e-11  0.015675  0.061854  0.918215  0.313839  0.044380
7   2.305528e-14  0.002721  0.022965  0.003423  0.167607  0.073019  4.044796e-11  0.020773  0.040071  0.914727  0.420027  0.026616
8   2.235907e-14  0.003622  0.036035  0.006228  0.218115  0.109756  4.466094e-11  0.028620  0.063734  0.439324  0.164661  0.003724
9   5.095045e-14  0.004166  0.034175  0.010811  0.238909  0.159675  7.262066e-11  0.039198  0.076998  0.540013  0.226233  0.002383
10  1.516367e-13  0.004739  0.051209  0.011125  0.248227  0.155707  2.031204e-10  0.040187  0.106888  0.452840  0.289605  0.003102

Ljung-Box Test (statistical significance, pvalue < 0.05):