1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 dask,
7 pandas,
8 psutil,
9 tqdm,
10 ipywidgets,
11 ray,
12}:
13
14buildPythonPackage rec {
15 pname = "swifter";
16 version = "1.4.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "jmcarpenter2";
21 repo = "swifter";
22 tag = version;
23 hash = "sha256-lgdf8E9GGjeLY4ERzxqtjQuYVtdtIZt2HFLSiNBbtX4=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 pandas
30 psutil
31 dask
32 tqdm
33 ] ++ dask.optional-dependencies.dataframe;
34
35 optional-dependencies = {
36 groupby = [ ray ];
37 notebook = [ ipywidgets ];
38 };
39
40 pythonImportsCheck = [ "swifter" ];
41
42 # tests may hang due to ignoring cpu core limit
43 # https://github.com/jmcarpenter2/swifter/issues/221
44 doCheck = false;
45
46 meta = {
47 description = "Package which efficiently applies any function to a pandas dataframe or series in the fastest available manner";
48 homepage = "https://github.com/jmcarpenter2/swifter";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ natsukium ];
51 };
52}