py2ls 0.1.10.26__tar.gz → 0.1.10.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/PKG-INFO +1 -1
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/ips.py +388 -10
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/plot.py +90 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/pyproject.toml +1 -1
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/README.md +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.DS_Store +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/COMMIT_EDITMSG +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/FETCH_HEAD +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/HEAD +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/config +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/description +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/applypatch-msg.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/commit-msg.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/fsmonitor-watchman.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/post-update.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-applypatch.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-commit.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-merge-commit.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-push.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-rebase.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/pre-receive.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/prepare-commit-msg.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/push-to-checkout.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/hooks/update.sample +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/index +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/info/exclude +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/logs/HEAD +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/logs/refs/heads/main +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/logs/refs/remotes/origin/HEAD +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/logs/refs/remotes/origin/main +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/01/d5bd8065e6860c0bd23ff9fa57161806a099e1 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/09/08da26de58c114225ad81f484b80bf5d351b34 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/12/c2808a1b3a4d0892a4154dfba1e2ae3770fa73 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1a/b4585881a6a42889f01aa0cfe25fd5acfaf46f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1c/3f92adda34344bcbbbf9d409c79855ae2aaea8 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1c/9314c5f69b9390068a2a8616875d974849d71f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1d/fe9d9633b24ea560354f4f93d39c6e5f163ea0 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/20/72c28e83f4347959d29f7b3a6c1fc3e4ee6b59 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/24/6b368b986f758630c46dc02b7fa512b53422f7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/27/aa6074f652bc6f7078f8647489d9ee8e24f0e2 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/28/c2969d785c1b892c2a96b3f00eba63a59811b3 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/2a/ae95d517d213b660bf4f65a4e0cfae7bb893eb +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/2a/fdf45791a26d42ccead35ace76a8f0b2a56561 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/32/fd627b62fad7cf3b2f9e34ab9777126a0987ad +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/34/9e31b6a3634cea102ce5588b98c11cc1738605 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/34/b6f3a2ee84f39bed4eee57f2c0e0afb994feb1 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/35/1a5f491ab97eee9d1ee699478d75a8bb5d3dc2 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/36/b4a1b7403abc6c360f8fe2cb656ab945254971 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/36/e56a361f526eafa59c5235a5c990bf288b5f9c +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/36/ef43e50009e59db11812c258846d9e38718173 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/39/7ead045fbbcfb17c62019eb18fe21ed05dbee5 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/39/b13be65125556784e44c7a1d9821703c7ab67e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/3b/507acc7f23391644cc0b824b1e79fd2677a362 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/3b/bd972aa7ad680858f8dfbd0f7fcd97756f0d6f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/3c/bbe5f4173d165127b9ad96119f1ec24c306ffc +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/3d/9d10d27724657a436c65a6254bfd213d4b3562 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/3f/d6561300938afbb3d11976cf9c8f29549280d9 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/41/dcf4b3bf0460946b2da93776cf9e836d62178f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/43/dbd49b2ee367c5434dd545e3b5795434f2ef0b +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/45/b1b6178bacbfc997811a998b5cc60c1ea7fac8 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/47/6cbd5a7c5e35cddef2f8a38bdc4896d403b095 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/48/a88fc5806305d0bb0755ee6801161b79696972 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/4f/7afb40dff2153d857fc85748c2eecb85125042 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/50/08ddfcf53c02e82d7eee2e57c38e5672ef89f6 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/53/e0deb1cb4c2c606bced6e7f9a66b0fda60980d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/56/e4e8b2d5545e0256090f45aa8fc42c5fe067d0 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/57/63d0c52f5c9c69e89d514a1f96034947abe21a +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/57/bd1c0199483ab316235b094543b85edec6c35e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/58/20a729045d4dc7e37ccaf8aa8eec126850afe2 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/59/380c4c26bdcd4d9b71ae3e2e35f05b3f26c5ab +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/5a/192565abf89c9d765af846ce6d53a92b1ce7ad +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/60/f273eb1c412d916fa3f11318a7da7a9911b52a +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/61/570cec8c061abe74121f27f5face6c69b98f99 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/62/4488173ed2c8936fa5cea3cf5dd3f26a30b86e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/62/7c81b23b4e56e87b042b650b0103653cc9e34a +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/62/d90ccf8cbefdc2e4fd475e7c6f4f76e9fdf801 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/63/100154b27846e8010e55b6bf4b3d7762c14c5f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/64/27a4edff08f93d98f511418423f09f2ab90bcd +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/66/6227eeeba24073e63811e89f1449f3d958f183 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/66/c998778721d424bd0aae80602dabbffa93af2e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/68/6df3072c8b025fb18106ed2df505994ad062a9 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/69/13c452ca319f7cbf6a0836dc10a5bb033c84e4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/6a/52e747a2b349b128d1490d9e896d2323818eb7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/6b/7fde264d93a7a0986d394c46c7650d0ce2ab92 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/6c/cebb29b7f3f5b0c889f6dadbf9ff066554587d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/6d/c2cdf4a84e538e5d4777486aeff87e42f41799 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/6d/ee29dbdcc84edeeacede105110446f3ccac963 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/71/36b2074a2754be8b58127d82250e5b37e3c373 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/72/245a05b0966011cb381e6b32b0465000e969ab +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/72/e4179337639859678ddaecf38b16f33aaec8e1 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/78/063f4c863fc371ec0313303c0a81283b35d9b6 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/78/3d4167bc95c9d2175e0df03ef1c1c880ba75ab +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/79/7ae089b2212a937840e215276005ce76881307 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/7e/5956c806b5edc344d46dab599dec337891ba1f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/81/8f26b7bf042269729020cf944fc362d66ba27e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/82/70b319ce4046854fbe7dc41054b6c2d112dab2 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/84/59071b722a255b774a80b27746033f8141ab39 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/85/aee46f478e9afdb84d50a05242c53b04ed2e21 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/86/e288b46f8fe179907e4413f665aeb5053fddb1 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/87/ef1fc3f7f1ddc4d0ab9b3e65381ce9f3388621 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/8b/84f56978e1de8f2ae82abce5f8b3e182d365cd +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/8e/55a7d2b96184030211f20c9b9af201eefcac82 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/91/c69ad88fe0ba94aa7859fb5f7edac5e6f1a3f7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/94/74152b4b463d70ae5ad07f0c658be3e296026b +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/94/f7dbe88e80c4205a901b71eb8f181974376bba +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/97/1aef09ea939f46b60b9646f8d524c78a9220f4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/9b/ec5ee2236ee2d5532c36bfd132e23c58fdb69c +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/9d/0df52899fe95279059286d9c0ec42287edc168 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/a1/5389729850729fc7bd78a54f26fce77f30be12 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/a1/906da89d1174f74867800c74c43af36253bd5e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/a4/63fdd23e5efd713db8a71f316f3a1c7bd60916 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/a5/ec8f74642fbba27f7ea78c53b372ae0c7dedce +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/a7/3e13eafee65c5b8d73ad2d3ea46d0eee82f0d3 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b0/56be4be89ba6b76949dd641df45bb7036050c8 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b0/9cd7856d58590578ee1a4f3ad45d1310a97f87 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b2/18e6a0f0f1c4df8cdefa9852058348abc713b7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b3/4f7f271c6d6105e35a6556ffda71d03afe8c96 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b3/69579064bde9de9a19d114fc33e4e48cc8c0e4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b5/61831c7dce8ea51e7ee6b6fa35745f14d8242d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/b7/2c9e75ab7d0afe594664650aa8f6c772f5ac64 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/bb/81ccc0513f18fc160b54a82861e9a80d23f4f6 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/bb/934eb33bc1a8b85630bf680caffd99560c1b8f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/bf/67907e337021ebff434e02b19b30a741c144af +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/bf/b54d65922ce1dfda1aaa014913a54e7172d0bc +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/c1/20fc812b9ad311c34a3608512d6a9d976bb48e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/c1/397c6ed72c4e20ef6b9ab83163e9a6baba5b45 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/c4/cba65f1163661999ee4b8ed23342b63bc1300c +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/c6/7f17e5707313600efcb85e9a3fedea35dba591 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/c6/f32aced880bd165a251cb52b26b0c1107e2141 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/cc/45df1d317a2eb63ff1ff3a5f3b4a9f98fd92b5 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/cd/822b3574a88ebdd1ed82fd6983f37e626d52b4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/cf/0c0d9c6fb09473aaeb7f7e2edbd770c3f2ef3d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d2/992df305f4b56a466a2f221aeb182ddd20f418 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d6/39e8af592cd75a318d8affddd1bcc70c2095f2 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d6/9ab1c4aadf279936dd778e8346ba60f74705b6 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d8/4688b54c0040a30976b3a6540bc47adf7ce680 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d9/005f2cc7fc4e65f14ed5518276007c08cf2fd0 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d9/c2403fd166ce791b4e9d0c6792ed8342c71fcd +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/d9/dfa5aee51e92a541b707e8e7baea6f06deff98 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/db/141dbaa93594df2a8156182f361ee4db829359 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/db/3f2cd643292057936230b95cf7ec3046affe11 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/db/ffa8ea7bda721d0cee7b9e4ce5b2ef927733ff +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/dc/c2bdbafb3296e09d9ee4955cfa55d275825f94 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/dc/cdbd4266765d840be2ae35ab1752a0fa312c16 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/dd/87fb5f606fe380d81e6fe3a2c98f9f99e3e09b +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/de/214c626ac2dd2685bfaa0bc0fc20f528d014d7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/df/e0770424b2a19faf507a501ebfc23be8f54e7b +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e2/f2f8f4c25e62a297fc55f36acc6b01cfbab76f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e3/1356f90ea6dd0577b5e0b40b206319adcbf085 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e3/5a4dafc50850cacac7bf76c56db2715cbda2c4 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e4/6c715352db9fe3c887a635f1916df4ca1f4ff9 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e5/0580a0bd1e1b3d29f834382b80fceb61d5cf0c +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/e9/391ffe371f1cc43b42ef09b705d9c767c2e14f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/ea/3a18cc75e53792744ef754e05d3f4481768c13 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/ec/40fd8bf8e4c342534a9fc020289e402ba6bc9d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/ec/d980279432b13f0374b90ca439a6329cdece0f +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/ee/cee64eacaff022dcdc509c0c2b1da492f21060 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f1/e50757fddc28b445545dc7e2759b54cdd0f42e +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f4/b64d3107b39e3ad6f540c6607004ea34e6c024 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f4/ba7f815b886797b73fede071d86e0c134d2bc7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f5/61c3c1bf1c9ea9c9d1f556a7be2869f71f3bdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f6/44a8ff56fa035105fc517cbb1ac46c3d8e349a +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f7/c98ba5c2f903e603b1f5e63d49fbc8a43815cc +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/f9/045a08e96eb76848fc4d68e3e3e687cca39a2d +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/fa/147e6bb78a2e8db241d231295fd7f1ed061af8 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/fc/292e793ecfd42240ac43be407023bd731fa9e7 +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/refs/heads/main +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/refs/remotes/origin/HEAD +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/refs/remotes/origin/main +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.gitattributes +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.gitignore +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/LICENSE +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/README.md +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/__init__.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/batman.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/brain_atlas.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/chat.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/correlators.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/.DS_Store +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/db2ls_sql_chtsht.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/docs_links.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/email/email_html_template.html +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/lang_code_iso639.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style1.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style2.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style3.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style4.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style5.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style6.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style7.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style8.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/example/style9.pdf +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style1.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style10.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style11.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style12.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style2.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style3.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style4.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style5.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style6.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style7.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style8.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/data/styles/style9.json +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/db2ls.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/doc.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/export_requirements.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/freqanalysis.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/ich2ls.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/netfinder.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/ocr.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/setuptools-70.1.0-py3-none-any.whl +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/sleep_events_detectors.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/stats.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/translator.py +0 -0
- {py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/wb_detector.py +0 -0
@@ -46,7 +46,7 @@ from collections import Counter
|
|
46
46
|
from fuzzywuzzy import fuzz, process
|
47
47
|
from langdetect import detect
|
48
48
|
from duckduckgo_search import DDGS
|
49
|
-
|
49
|
+
from typing import List, Optional, Union
|
50
50
|
from bs4 import BeautifulSoup
|
51
51
|
|
52
52
|
from . import netfinder
|
@@ -1250,6 +1250,119 @@ def get_encoding(fpath, alternative_encodings=None, verbose=False):
|
|
1250
1250
|
return None
|
1251
1251
|
|
1252
1252
|
|
1253
|
+
def unzip(dir_path, output_dir=None):
|
1254
|
+
"""
|
1255
|
+
Unzips or extracts various compressed file formats (.gz, .zip, .7z, .tar, .bz2, .xz, .rar).
|
1256
|
+
If the output directory already exists, it will be replaced.
|
1257
|
+
|
1258
|
+
Parameters:
|
1259
|
+
dir_path (str): Path to the compressed file.
|
1260
|
+
output_dir (str): Directory where the extracted files will be saved.
|
1261
|
+
If None, it extracts to the same directory as the file, with the same name.
|
1262
|
+
|
1263
|
+
Returns:
|
1264
|
+
str: The path to the output directory where files are extracted.
|
1265
|
+
"""
|
1266
|
+
|
1267
|
+
# Set default output directory to the same as the input file
|
1268
|
+
if output_dir is None:
|
1269
|
+
output_dir = os.path.splitext(dir_path)[0]
|
1270
|
+
|
1271
|
+
# If the output directory already exists, remove it and replace it
|
1272
|
+
if os.path.exists(output_dir):
|
1273
|
+
if os.path.isdir(output_dir): # check if it is a folder
|
1274
|
+
shutil.rmtree(output_dir) # remove folder
|
1275
|
+
else:
|
1276
|
+
os.remove(output_dir) # remove file
|
1277
|
+
|
1278
|
+
# Handle .tar.gz files
|
1279
|
+
if dir_path.endswith(".tar.gz"):
|
1280
|
+
import tarfile
|
1281
|
+
|
1282
|
+
with tarfile.open(dir_path, "r:gz") as tar_ref:
|
1283
|
+
tar_ref.extractall(output_dir)
|
1284
|
+
return output_dir
|
1285
|
+
# Handle .gz files
|
1286
|
+
if dir_path.endswith(".gz"):
|
1287
|
+
import gzip
|
1288
|
+
|
1289
|
+
output_file = os.path.splitext(dir_path)[0] # remove the .gz extension
|
1290
|
+
with gzip.open(dir_path, "rb") as gz_file:
|
1291
|
+
with open(output_file, "wb") as out_file:
|
1292
|
+
shutil.copyfileobj(gz_file, out_file)
|
1293
|
+
return output_file
|
1294
|
+
|
1295
|
+
# Handle .zip files
|
1296
|
+
elif dir_path.endswith(".zip"):
|
1297
|
+
import zipfile
|
1298
|
+
|
1299
|
+
with zipfile.ZipFile(dir_path, "r") as zip_ref:
|
1300
|
+
zip_ref.extractall(output_dir)
|
1301
|
+
return output_dir
|
1302
|
+
|
1303
|
+
# Handle .7z files (requires py7zr)
|
1304
|
+
elif dir_path.endswith(".7z"):
|
1305
|
+
import py7zr
|
1306
|
+
|
1307
|
+
with py7zr.SevenZipFile(dir_path, mode="r") as z:
|
1308
|
+
z.extractall(path=output_dir)
|
1309
|
+
return output_dir
|
1310
|
+
|
1311
|
+
# Handle .tar files
|
1312
|
+
elif dir_path.endswith(".tar"):
|
1313
|
+
import tarfile
|
1314
|
+
|
1315
|
+
with tarfile.open(dir_path, "r") as tar_ref:
|
1316
|
+
tar_ref.extractall(output_dir)
|
1317
|
+
return output_dir
|
1318
|
+
|
1319
|
+
# Handle .tar.bz2 files
|
1320
|
+
elif dir_path.endswith(".tar.bz2"):
|
1321
|
+
import tarfile
|
1322
|
+
|
1323
|
+
with tarfile.open(dir_path, "r:bz2") as tar_ref:
|
1324
|
+
tar_ref.extractall(output_dir)
|
1325
|
+
return output_dir
|
1326
|
+
|
1327
|
+
# Handle .bz2 files
|
1328
|
+
elif dir_path.endswith(".bz2"):
|
1329
|
+
import bz2
|
1330
|
+
|
1331
|
+
output_file = os.path.splitext(dir_path)[0] # remove the .bz2 extension
|
1332
|
+
with bz2.open(dir_path, "rb") as bz_file:
|
1333
|
+
with open(output_file, "wb") as out_file:
|
1334
|
+
shutil.copyfileobj(bz_file, out_file)
|
1335
|
+
return output_file
|
1336
|
+
|
1337
|
+
# Handle .xz files
|
1338
|
+
elif dir_path.endswith(".xz"):
|
1339
|
+
import lzma
|
1340
|
+
|
1341
|
+
output_file = os.path.splitext(dir_path)[0] # remove the .xz extension
|
1342
|
+
with lzma.open(dir_path, "rb") as xz_file:
|
1343
|
+
with open(output_file, "wb") as out_file:
|
1344
|
+
shutil.copyfileobj(xz_file, out_file)
|
1345
|
+
return output_file
|
1346
|
+
|
1347
|
+
# Handle .rar files (requires rarfile)
|
1348
|
+
elif dir_path.endswith(".rar"):
|
1349
|
+
import rarfile
|
1350
|
+
|
1351
|
+
with rarfile.RarFile(dir_path) as rar_ref:
|
1352
|
+
rar_ref.extractall(output_dir)
|
1353
|
+
return output_dir
|
1354
|
+
|
1355
|
+
else:
|
1356
|
+
raise ValueError(f"Unsupported file format: {os.path.splitext(dir_path)[1]}")
|
1357
|
+
|
1358
|
+
|
1359
|
+
# Example usage:
|
1360
|
+
# output_dir = unzip('data.tar.gz')
|
1361
|
+
# output_file = unzip('file.csv.gz')
|
1362
|
+
# output_dir_zip = unzip('archive.zip')
|
1363
|
+
# output_dir_7z = unzip('archive.7z')
|
1364
|
+
|
1365
|
+
|
1253
1366
|
def fload(fpath, kind=None, **kwargs):
|
1254
1367
|
"""
|
1255
1368
|
Load content from a file with specified file type.
|
@@ -1398,11 +1511,26 @@ def fload(fpath, kind=None, **kwargs):
|
|
1398
1511
|
"pdf",
|
1399
1512
|
"ipynb",
|
1400
1513
|
]
|
1401
|
-
|
1514
|
+
zip_types = ["gz", "zip", "7z", "tar", "tar.gz", "tar.bz2", "bz2", "xz", "rar"]
|
1515
|
+
supported_types = [*doc_types, *img_types, *zip_types]
|
1402
1516
|
if kind not in supported_types:
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1517
|
+
print(f'Error:\n"{kind}" is not in the supported list {supported_types}')
|
1518
|
+
# if os.path.splitext(fpath)[1][1:].lower() in zip_types:
|
1519
|
+
# keep=kwargs.get("keep", False)
|
1520
|
+
# ifile=kwargs.get("ifile",(0,0))
|
1521
|
+
# kwargs.pop("keep",None)
|
1522
|
+
# kwargs.pop("ifile",None)
|
1523
|
+
# fpath_unzip=unzip(fpath)
|
1524
|
+
# if isinstance(fpath_unzip,list):
|
1525
|
+
# fpath_unzip=fpath_unzip[ifile[0]]
|
1526
|
+
# if os.path.isdir(fpath_unzip):
|
1527
|
+
# fpath_selected=listdir(fpath_unzip,kind=kind).fpath[ifile[1]]
|
1528
|
+
# fpath_unzip=fpath_selected
|
1529
|
+
# content_unzip=fload(fpath_unzip, **kwargs)
|
1530
|
+
# if not keep:
|
1531
|
+
# os.remove(fpath_unzip)
|
1532
|
+
# return content_unzip
|
1533
|
+
|
1406
1534
|
if kind == "docx":
|
1407
1535
|
return load_docx(fpath)
|
1408
1536
|
elif kind == "txt" or kind == "md":
|
@@ -1427,10 +1555,21 @@ def fload(fpath, kind=None, **kwargs):
|
|
1427
1555
|
elif kind.lower() in img_types:
|
1428
1556
|
print(f'Image ".{kind}" is loaded.')
|
1429
1557
|
return load_img(fpath)
|
1558
|
+
elif kind.lower() in zip_types:
|
1559
|
+
keep = kwargs.get("keep", False)
|
1560
|
+
fpath_unzip = unzip(fpath)
|
1561
|
+
content_unzip = fload(fpath_unzip, **kwargs)
|
1562
|
+
if not keep:
|
1563
|
+
os.remove(fpath_unzip)
|
1564
|
+
return content_unzip
|
1430
1565
|
else:
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1566
|
+
try:
|
1567
|
+
with open(fpath, "r") as f:
|
1568
|
+
content = f.readlines()
|
1569
|
+
except:
|
1570
|
+
with open(fpath, "r") as f:
|
1571
|
+
content = f.read()
|
1572
|
+
return content
|
1434
1573
|
|
1435
1574
|
|
1436
1575
|
# Example usage
|
@@ -2030,10 +2169,10 @@ def mkdir(*args, **kwargs):
|
|
2030
2169
|
if isinstance(arg, (str, list)):
|
2031
2170
|
if "/" in arg or "\\" in arg:
|
2032
2171
|
pardir = arg
|
2033
|
-
print(f"
|
2172
|
+
print(f'pardir: "{pardir}"')
|
2034
2173
|
else:
|
2035
2174
|
chdir = arg
|
2036
|
-
print(f"
|
2175
|
+
print(f'chdir:"{chdir}"')
|
2037
2176
|
elif isinstance(arg, bool):
|
2038
2177
|
overwrite = arg
|
2039
2178
|
print(overwrite)
|
@@ -2049,6 +2188,13 @@ def mkdir(*args, **kwargs):
|
|
2049
2188
|
pardir = os.path.normpath(pardir)
|
2050
2189
|
# Get the slash type: "/" or "\"
|
2051
2190
|
stype = "/" if "/" in pardir else "\\"
|
2191
|
+
if "mac" in get_os().lower() or "lin" in get_os().lower():
|
2192
|
+
stype = "/"
|
2193
|
+
elif "win" in get_os().lower():
|
2194
|
+
stype = "\\"
|
2195
|
+
else:
|
2196
|
+
stype = "/"
|
2197
|
+
|
2052
2198
|
# Check if the parent directory exists and is a directory path
|
2053
2199
|
if os.path.isdir(pardir):
|
2054
2200
|
os.chdir(pardir) # Set current path
|
@@ -4046,3 +4192,235 @@ def preview(var):
|
|
4046
4192
|
# preview("# This is a Markdown header")
|
4047
4193
|
# preview(pd.DataFrame({"Name": ["Alice", "Bob"], "Age": [25, 30]}))
|
4048
4194
|
# preview({"key": "value", "numbers": [1, 2, 3]})
|
4195
|
+
|
4196
|
+
|
4197
|
+
# ! DataFrame
|
4198
|
+
def df_as_type(
|
4199
|
+
df: pd.DataFrame,
|
4200
|
+
columns: Optional[Union[str, List[str]]] = None,
|
4201
|
+
astype: str = "datetime",
|
4202
|
+
format: Optional[str] = None,
|
4203
|
+
inplace: bool = False,
|
4204
|
+
errors: str = "coerce", # Can be "ignore", "raise", or "coerce"
|
4205
|
+
**kwargs,
|
4206
|
+
) -> Optional[pd.DataFrame]:
|
4207
|
+
"""
|
4208
|
+
Convert specified columns of a DataFrame to a specified type (e.g., datetime, float, int, numeric, timedelta).
|
4209
|
+
If columns is None, all columns in the DataFrame will be converted.
|
4210
|
+
|
4211
|
+
Parameters:
|
4212
|
+
- df: DataFrame containing the columns to convert.
|
4213
|
+
- columns: Either a single column name, a list of column names, or None to convert all columns.
|
4214
|
+
- astype: The target type to convert the columns to ('datetime', 'float', 'int', 'numeric', 'timedelta', etc.).
|
4215
|
+
- format: Optional; format to specify the datetime format (only relevant for 'datetime' conversion).
|
4216
|
+
- inplace: Whether to modify the DataFrame in place or return a new one. Defaults to False.
|
4217
|
+
- errors: Can be "ignore", "raise", or "coerce"
|
4218
|
+
- **kwargs: Additional keyword arguments to pass to the conversion function (e.g., errors='ignore' for pd.to_datetime or pd.to_numeric).
|
4219
|
+
|
4220
|
+
Returns:
|
4221
|
+
- If inplace=False: DataFrame with the specified columns (or all columns if columns=None) converted to the specified type.
|
4222
|
+
- If inplace=True: The original DataFrame is modified in place, and nothing is returned.
|
4223
|
+
"""
|
4224
|
+
astypes = [
|
4225
|
+
"datetime",
|
4226
|
+
"timedelta",
|
4227
|
+
"numeric",
|
4228
|
+
"int",
|
4229
|
+
"int8",
|
4230
|
+
"int16",
|
4231
|
+
"int32",
|
4232
|
+
"int64",
|
4233
|
+
"uint8",
|
4234
|
+
"uint16",
|
4235
|
+
"uint32",
|
4236
|
+
"uint64",
|
4237
|
+
"float",
|
4238
|
+
"float16",
|
4239
|
+
"float32",
|
4240
|
+
"float64",
|
4241
|
+
"complex",
|
4242
|
+
"complex64",
|
4243
|
+
"complex128",
|
4244
|
+
"str",
|
4245
|
+
"string",
|
4246
|
+
"bool",
|
4247
|
+
"datetime64",
|
4248
|
+
"datetime64[ns]",
|
4249
|
+
"timedelta64",
|
4250
|
+
"timedelta64[ns]",
|
4251
|
+
"category",
|
4252
|
+
"object",
|
4253
|
+
"Sparse",
|
4254
|
+
"hour",
|
4255
|
+
"minute",
|
4256
|
+
"second",
|
4257
|
+
"time",
|
4258
|
+
"week",
|
4259
|
+
"date",
|
4260
|
+
"month",
|
4261
|
+
"year",
|
4262
|
+
]
|
4263
|
+
# correct the astype input
|
4264
|
+
astype = strcmp(astype, astypes)[0]
|
4265
|
+
print(f"converting {columns} as type: {astype}")
|
4266
|
+
# If inplace is False, make a copy of the DataFrame
|
4267
|
+
if not inplace:
|
4268
|
+
df = df.copy()
|
4269
|
+
# If columns is None, apply to all columns
|
4270
|
+
if columns is None:
|
4271
|
+
columns = df.columns
|
4272
|
+
|
4273
|
+
# Ensure columns is a list
|
4274
|
+
if isinstance(columns, (str, int)):
|
4275
|
+
columns = [columns]
|
4276
|
+
|
4277
|
+
# Convert specified columns
|
4278
|
+
for column in columns:
|
4279
|
+
try:
|
4280
|
+
if astype in [
|
4281
|
+
"datetime",
|
4282
|
+
"hour",
|
4283
|
+
"minute",
|
4284
|
+
"second",
|
4285
|
+
"time",
|
4286
|
+
"week",
|
4287
|
+
"date",
|
4288
|
+
"month",
|
4289
|
+
"year",
|
4290
|
+
]:
|
4291
|
+
kwargs.pop("errors", None)
|
4292
|
+
# convert it as type: datetime
|
4293
|
+
if isinstance(column, int):
|
4294
|
+
df.iloc[:, column] = pd.to_datetime(
|
4295
|
+
df.iloc[:, column], format=format, errors=errors, **kwargs
|
4296
|
+
)
|
4297
|
+
# further convert:
|
4298
|
+
if astype == "time":
|
4299
|
+
df.iloc[:, column] = df.iloc[:, column].dt.time
|
4300
|
+
elif astype == "month":
|
4301
|
+
df.iloc[:, column] = df.iloc[:, column].dt.month
|
4302
|
+
elif astype == "year":
|
4303
|
+
df.iloc[:, column] = df.iloc[:, column].dt.year
|
4304
|
+
elif astype == "date":
|
4305
|
+
df.iloc[:, column] = df.iloc[:, column].dt.date
|
4306
|
+
elif astype == "hour":
|
4307
|
+
df.iloc[:, column] = df.iloc[:, column].dt.hour
|
4308
|
+
elif astype == "minute":
|
4309
|
+
df.iloc[:, column] = df.iloc[:, column].dt.minute
|
4310
|
+
elif astype == "second":
|
4311
|
+
df.iloc[:, column] = df.iloc[:, column].dt.second
|
4312
|
+
elif astype == "week":
|
4313
|
+
df.iloc[:, column] = df.iloc[:, column].dt.day_name()
|
4314
|
+
else:
|
4315
|
+
df[column] = (
|
4316
|
+
pd.to_datetime(
|
4317
|
+
df[column], format=format, errors=errors, **kwargs
|
4318
|
+
)
|
4319
|
+
if format
|
4320
|
+
else pd.to_datetime(df[column], errors=errors, **kwargs)
|
4321
|
+
)
|
4322
|
+
# further convert:
|
4323
|
+
if astype == "time":
|
4324
|
+
df[column] = df[column].dt.time
|
4325
|
+
elif astype == "month":
|
4326
|
+
df[column] = df[column].dt.month
|
4327
|
+
elif astype == "year":
|
4328
|
+
df[column] = df[column].dt.year
|
4329
|
+
elif astype == "date":
|
4330
|
+
df[column] = df[column].dt.date
|
4331
|
+
elif astype == "hour":
|
4332
|
+
df[column] = df[column].dt.hour
|
4333
|
+
elif astype == "minute":
|
4334
|
+
df[column] = df[column].dt.minute
|
4335
|
+
elif astype == "second":
|
4336
|
+
df[column] = df[column].dt.second
|
4337
|
+
elif astype == "week":
|
4338
|
+
df[column] = df[column].dt.day_name()
|
4339
|
+
|
4340
|
+
elif astype == "numeric":
|
4341
|
+
kwargs.pop("errors", None)
|
4342
|
+
df[column] = pd.to_numeric(df[column], errors=errors, **kwargs)
|
4343
|
+
# print(f"Successfully converted '{column}' to numeric.")
|
4344
|
+
elif astype == "timedelta":
|
4345
|
+
kwargs.pop("errors", None)
|
4346
|
+
df[column] = pd.to_timedelta(df[column], errors=errors, **kwargs)
|
4347
|
+
# print(f"Successfully converted '{column}' to timedelta.")
|
4348
|
+
else:
|
4349
|
+
# Convert to other types (e.g., float, int)
|
4350
|
+
df[column] = df[column].astype(astype)
|
4351
|
+
# print(f"Successfully converted '{column}' to {astype}.")
|
4352
|
+
except Exception as e:
|
4353
|
+
print(f"Error converting '{column}' to {astype}: {e}")
|
4354
|
+
|
4355
|
+
# Return the modified DataFrame if inplace is False
|
4356
|
+
if not inplace:
|
4357
|
+
return df
|
4358
|
+
|
4359
|
+
|
4360
|
+
# ! DataFrame
|
4361
|
+
def df_sort_values(df, column, by=None, ascending=True, inplace=False, **kwargs):
|
4362
|
+
"""
|
4363
|
+
Sort a DataFrame by a specified column based on a custom order.
|
4364
|
+
|
4365
|
+
Parameters:
|
4366
|
+
- df: DataFrame to be sorted.
|
4367
|
+
- column: The name of the column to sort by.
|
4368
|
+
- by: List specifying the custom order for sorting.
|
4369
|
+
- ascending: Boolean or list of booleans, default True.
|
4370
|
+
Sort ascending vs. descending.
|
4371
|
+
- inplace: If True, perform operation in place and return None.
|
4372
|
+
- **kwargs: Additional arguments to pass to sort_values.
|
4373
|
+
|
4374
|
+
Returns:
|
4375
|
+
- Sorted DataFrame if inplace is False, otherwise None.
|
4376
|
+
"""
|
4377
|
+
if column not in df.columns:
|
4378
|
+
raise ValueError(f"Column '{column}' does not exist in the DataFrame.")
|
4379
|
+
|
4380
|
+
if not isinstance(by, list):
|
4381
|
+
raise ValueError("custom_order must be a list.")
|
4382
|
+
|
4383
|
+
try:
|
4384
|
+
# Convert the specified column to a categorical type with the custom order
|
4385
|
+
df[column] = pd.Categorical(df[column], categories=by, ordered=True)
|
4386
|
+
if inplace: # replace the original
|
4387
|
+
df.sort_values(column, ascending=ascending, inplace=True, **kwargs)
|
4388
|
+
print(f"Successfully sorted DataFrame by '{column}'")
|
4389
|
+
return None
|
4390
|
+
else:
|
4391
|
+
sorted_df = df.sort_values(column, ascending=ascending, **kwargs)
|
4392
|
+
print(f"Successfully sorted DataFrame by '{column}' using custom order.")
|
4393
|
+
return sorted_df
|
4394
|
+
except Exception as e:
|
4395
|
+
print(f"Error sorting DataFrame by '{column}': {e}")
|
4396
|
+
return df
|
4397
|
+
|
4398
|
+
|
4399
|
+
# # Example usage:
|
4400
|
+
# # Sample DataFrame
|
4401
|
+
# data = {
|
4402
|
+
# "month": ["March", "January", "February", "April", "December"],
|
4403
|
+
# "Amount": [200, 100, 150, 300, 250],
|
4404
|
+
# }
|
4405
|
+
# df_month = pd.DataFrame(data)
|
4406
|
+
|
4407
|
+
# # Define the month order
|
4408
|
+
# month_order = [
|
4409
|
+
# "January",
|
4410
|
+
# "February",
|
4411
|
+
# "March",
|
4412
|
+
# "April",
|
4413
|
+
# "May",
|
4414
|
+
# "June",
|
4415
|
+
# "July",
|
4416
|
+
# "August",
|
4417
|
+
# "September",
|
4418
|
+
# "October",
|
4419
|
+
# "November",
|
4420
|
+
# "December",
|
4421
|
+
# ]
|
4422
|
+
# display(df_month)
|
4423
|
+
# sorted_df_month = df_sort_values(df_month, "month", month_order, ascending=True)
|
4424
|
+
# display(sorted_df_month)
|
4425
|
+
# df_sort_values(df_month, "month", month_order, ascending=True, inplace=True)
|
4426
|
+
# display(df_month)
|
@@ -17,6 +17,96 @@ from .stats import *
|
|
17
17
|
logging.getLogger("fontTools").setLevel(logging.WARNING)
|
18
18
|
|
19
19
|
|
20
|
+
def df_corr(
|
21
|
+
df,
|
22
|
+
columns="all",
|
23
|
+
tri="u",
|
24
|
+
mask=True,
|
25
|
+
k=1,
|
26
|
+
annot=True,
|
27
|
+
cmap="coolwarm",
|
28
|
+
fmt=".2f",
|
29
|
+
cluster=False, # New parameter for clustermap option
|
30
|
+
figsize=(10, 8),
|
31
|
+
row_cluster=True, # Perform clustering on rows
|
32
|
+
col_cluster=True, # Perform clustering on columns
|
33
|
+
dendrogram_ratio=(0.2, 0.1), # Adjust size of dendrograms
|
34
|
+
cbar_pos=(0.02, 0.8, 0.03, 0.2), # Adjust colorbar position
|
35
|
+
xticklabels=True, # Show column labels
|
36
|
+
yticklabels=True, # Show row labels
|
37
|
+
**kwargs,
|
38
|
+
):
|
39
|
+
# Select numeric columns or specific subset of columns
|
40
|
+
if columns == "all":
|
41
|
+
df_numeric = df.select_dtypes(include=[float, int])
|
42
|
+
else:
|
43
|
+
df_numeric = df[columns]
|
44
|
+
|
45
|
+
# Compute the correlation matrix
|
46
|
+
correlation_matrix = df_numeric.corr()
|
47
|
+
|
48
|
+
# Generate mask for the upper triangle if mask is True
|
49
|
+
if mask:
|
50
|
+
if "u" in tri.lower(): # upper => np.tril
|
51
|
+
mask_array = np.tril(np.ones_like(correlation_matrix, dtype=bool), k=k)
|
52
|
+
else: # lower => np.triu
|
53
|
+
mask_array = np.triu(np.ones_like(correlation_matrix, dtype=bool), k=k)
|
54
|
+
else:
|
55
|
+
mask_array = None
|
56
|
+
|
57
|
+
# Remove conflicting kwargs
|
58
|
+
kwargs.pop("mask", None)
|
59
|
+
kwargs.pop("annot", None)
|
60
|
+
kwargs.pop("cmap", None)
|
61
|
+
kwargs.pop("fmt", None)
|
62
|
+
|
63
|
+
kwargs.pop("clustermap", None)
|
64
|
+
kwargs.pop("row_cluster", None)
|
65
|
+
kwargs.pop("col_cluster", None)
|
66
|
+
kwargs.pop("dendrogram_ratio", None)
|
67
|
+
kwargs.pop("cbar_pos", None)
|
68
|
+
kwargs.pop("xticklabels", None)
|
69
|
+
kwargs.pop("col_cluster", None)
|
70
|
+
|
71
|
+
# Plot the heatmap or clustermap
|
72
|
+
if cluster:
|
73
|
+
# Create a clustermap
|
74
|
+
cluster_obj = sns.clustermap(
|
75
|
+
correlation_matrix,
|
76
|
+
mask=mask_array,
|
77
|
+
annot=annot,
|
78
|
+
cmap=cmap,
|
79
|
+
fmt=fmt,
|
80
|
+
figsize=figsize, # Figure size, adjusted for professional display
|
81
|
+
row_cluster=row_cluster, # Perform clustering on rows
|
82
|
+
col_cluster=col_cluster, # Perform clustering on columns
|
83
|
+
dendrogram_ratio=dendrogram_ratio, # Adjust size of dendrograms
|
84
|
+
cbar_pos=cbar_pos, # Adjust colorbar position
|
85
|
+
xticklabels=xticklabels, # Show column labels
|
86
|
+
yticklabels=yticklabels, # Show row labels
|
87
|
+
**kwargs, # Pass any additional arguments to sns.clustermap
|
88
|
+
)
|
89
|
+
|
90
|
+
return (
|
91
|
+
cluster_obj.ax_row_dendrogram,
|
92
|
+
cluster_obj.ax_col_dendrogram,
|
93
|
+
cluster_obj.ax_heatmap,
|
94
|
+
)
|
95
|
+
else:
|
96
|
+
# Create a standard heatmap
|
97
|
+
plt.figure(figsize=(10, 8))
|
98
|
+
ax = sns.heatmap(
|
99
|
+
correlation_matrix,
|
100
|
+
mask=mask_array,
|
101
|
+
annot=annot,
|
102
|
+
cmap=cmap,
|
103
|
+
fmt=fmt,
|
104
|
+
**kwargs, # Pass any additional arguments to sns.heatmap
|
105
|
+
)
|
106
|
+
# Return the Axes object for further customization if needed
|
107
|
+
return ax
|
108
|
+
|
109
|
+
|
20
110
|
def catplot(data, *args, **kwargs):
|
21
111
|
"""
|
22
112
|
catplot(data, opt=None, ax=None)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/01/d5bd8065e6860c0bd23ff9fa57161806a099e1
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/09/08da26de58c114225ad81f484b80bf5d351b34
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/12/c2808a1b3a4d0892a4154dfba1e2ae3770fa73
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1a/b4585881a6a42889f01aa0cfe25fd5acfaf46f
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1c/3f92adda34344bcbbbf9d409c79855ae2aaea8
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1c/9314c5f69b9390068a2a8616875d974849d71f
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/1d/fe9d9633b24ea560354f4f93d39c6e5f163ea0
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/20/72c28e83f4347959d29f7b3a6c1fc3e4ee6b59
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/24/6b368b986f758630c46dc02b7fa512b53422f7
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/27/aa6074f652bc6f7078f8647489d9ee8e24f0e2
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/28/c2969d785c1b892c2a96b3f00eba63a59811b3
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/2a/ae95d517d213b660bf4f65a4e0cfae7bb893eb
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/2a/fdf45791a26d42ccead35ace76a8f0b2a56561
RENAMED
File without changes
|
{py2ls-0.1.10.26 → py2ls-0.1.10.27}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4
RENAMED
File without changes
|