pyMannKendall: a python package for non parametric Mann Kendall family of trend tests.

Trend analysis is one of the most important measurements in studying time series data. Both parametric and non-parametric tests are commonly used in trend analysis. Parametric tests require data to be independent and normally distributed. On the other hand, non-parametric trend tests require only that the data be independent and can tolerate outliers in the data (Hamed & Rao, 1998). However, parametric tests are more powerful than nonparametric ones.

The Mann-Kendall trend test (Kendall, 1975;Mann, 1945) is a widely used non-parametric tests to detect significant trends in time series.However, the original Mann-Kendall test didn't consider serial correlation or seasonality effects (Bari, Rahman, Hoque, & Hussain, 2016;Hirsch, Slack, & Smith, 1982).But, in many real situations, the observed data are autocorrelated and this autocorrelation will result in misinterpretation of trend tests results (Cox & Stuart, 1955;Hamed & Rao, 1998).Contrariwise, water quality, hydrologic, as well as climatic and other natural time series also have seasonality.To overcome those limitations of original Mann-Kendall test, various modified Mann-Kendall test have been developed.
Again, Python is one of the widely used tools for data analysis.A large number of data analysis and research tools are also developed using Python.But, till now, there is no Mann-Kendall trend relation Python package available.pyMannKendall package fills this gap.
pyMannKendall is written in pure Python and uses a vectorization approach to increase its performance.Currently, this package has 11 Mann-Kendall Tests and 2 Sen's slope estimator functions.Brief description of the functions are below: 1. Original Mann-Kendall test (original_test): Original Mann-Kendall test (Kendall, 1975;Mann, 1945) is a nonparametric test, which does not consider serial correlation or seasonal effects.

Hamed and Rao Modified MK Test (hamed_rao_modification_test):
This modified MK test was proposed by Hamed & Rao (1998) to address serial autocorrelation issues.They suggested a variance correction approach to improve trend analysis.Users can consider first n significant lag by insert lag number in this function.By default, it considered all significant lags.

Yue and Wang Modified MK Test (yue_wang_modification_test):
This is also a variance correction method for considered serial autocorrelation proposed by Yue & Wang (2004).Users can also set their desired significant number of lags for the calculation.

Modified MK test using Pre-Whitening method (pre_whitening_modification_test):
This test was suggested by Yue & Wang (2002) to use Pre-Whitening the time series before the application of trend test.

Modified MK test using Trend free Pre-Whitening method (trend_free_pre_whitening_m
This test was also proposed by Yue, Pilon, Phinney, & Cavadias (2002) to remove trend components and then Pre-Whitening the time series before application of trend test.
6. Multivariate MK Test (multivariate_test): This is an MK test for multiple parameters proposed by Hirsch et al. (1982).They used this method for seasonal MK tests, where they considered every month as a parameter.
7. Seasonal MK Test (seasonal_test): For seasonal time series data, Hirsch et al. (1982) Libiseller & Grimvall (2002) proposed this partial mk test.It required two parameters as input, where one is the response parameter and other is an independent parameter.
13. Seasonal sen's Slope Estimator (seasonal_sens_slope): This method was proposed by Hipel & McLeod (1994) to estimate the magnitude of the monotonic trend, when data has seasonal effects.
pyMannKendall is a non-parametric Mann-Kendall trend analysis package implemented in pure Python, which brings together almost all types of Mann-Kendall tests, which might help researchers to check Mann-Kendall trends in Python.
proposed this test to calculate the seasonal trend.In a real event, many factors affect the main studied response parameter, which can bias the trend results.To overcome this problem,