inspectpd 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Alastair Rushworth
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: inspectpd
3
+ Version: 0.1.0
4
+ Summary: inspectpd: Inspection, Comparison and Visualisation of Data Frames
5
+ Home-page: http://github.com/alastairrushworth/inspectpd
6
+ Author: Alastair Rushworth
7
+ Author-email: alastairmrushworth@gmail.com
8
+ License: MIT
9
+ License-File: LICENSE.txt
@@ -0,0 +1,45 @@
1
+
2
+ # inspectpd
3
+
4
+ ## Overview
5
+
6
+ `inspectpd` is collection of utilities for columnwise summary,
7
+ comparison and visualisation of `pandas` dataframes. The package patches
8
+ in the following methods for pandas objects:
9
+
10
+ - [`.inspect_types()`](#column-types) summary of column types
11
+ - [`.inspect_mem()`](#memory-usage) summary of memory usage of columns
12
+ - [`.inspect_na()`](#missing-values) columnwise prevalence of missing
13
+ values
14
+ - [`.inspect_cor()`](#correlation) correlation coefficients of numeric
15
+ columns
16
+ - [`.inspect_imb()`](#feature-imbalance) feature imbalance of
17
+ non-numeric
18
+ - [`.inspect_num()`](#numeric-summaries) summaries of numeric columns
19
+ - [`.inspect_cat()`](#categorical-levels) summaries of non-numeric
20
+
21
+ ## Installation and use
22
+
23
+ You can install `inspectpd` using `pip`:
24
+
25
+ ```python
26
+ pip install git+https://github.com/alastairrushworth/inspectpd
27
+ ```
28
+
29
+ Simply import the package and use the methods on a pandas dataframe:
30
+
31
+ ```
32
+ import inspectpd
33
+ # example data set for illustration
34
+ from inspectpd import starwars
35
+
36
+ # categorical features summary
37
+ starwars.inspect_cat()
38
+ ```
39
+
40
+ You can also get a quick visualisation of the summary too:
41
+
42
+ ```
43
+ # get a plot of the categorical features
44
+ starwars.inspect_cat().view()
45
+ ```
@@ -0,0 +1,24 @@
1
+ # import inspect_ fns
2
+ from .inspect.inspect_types import inspect_types
3
+ from .inspect.inspect_na import inspect_na
4
+ from .inspect.inspect_cat import inspect_cat
5
+ from .inspect.inspect_cor import inspect_cor
6
+ from .inspect.inspect_imb import inspect_imb
7
+ from .inspect.inspect_mem import inspect_mem
8
+ from .inspect.inspect_num import inspect_num
9
+
10
+
11
+ # monkey-patch as methods to pandas
12
+ from pandas.core.base import PandasObject
13
+ PandasObject.inspect_imb = inspect_imb
14
+ PandasObject.inspect_na = inspect_na
15
+ PandasObject.inspect_types = inspect_types
16
+ PandasObject.inspect_mem = inspect_mem
17
+ PandasObject.inspect_cat = inspect_cat
18
+ PandasObject.inspect_cor = inspect_cor
19
+ PandasObject.inspect_num = inspect_num
20
+
21
+ # import data
22
+ from pandas import read_csv
23
+ starwars = read_csv('inspectpd/data/starwars.csv', index_col = 0)
24
+ tdf = read_csv('inspectpd/data/tdf.csv')
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: inspectpd
3
+ Version: 0.1.0
4
+ Summary: inspectpd: Inspection, Comparison and Visualisation of Data Frames
5
+ Home-page: http://github.com/alastairrushworth/inspectpd
6
+ Author: Alastair Rushworth
7
+ Author-email: alastairmrushworth@gmail.com
8
+ License: MIT
9
+ License-File: LICENSE.txt
@@ -0,0 +1,11 @@
1
+ LICENSE.txt
2
+ README.md
3
+ setup.cfg
4
+ setup.py
5
+ inspectpd/__init__.py
6
+ inspectpd.egg-info/PKG-INFO
7
+ inspectpd.egg-info/SOURCES.txt
8
+ inspectpd.egg-info/dependency_links.txt
9
+ inspectpd.egg-info/not-zip-safe
10
+ inspectpd.egg-info/requires.txt
11
+ inspectpd.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ numpy
2
+ pandas
3
+ plotnine
4
+ scipy
@@ -0,0 +1 @@
1
+ inspectpd
@@ -0,0 +1,7 @@
1
+ [metadata]
2
+ description-file = README.md
3
+
4
+ [egg_info]
5
+ tag_build =
6
+ tag_date = 0
7
+
@@ -0,0 +1,16 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name = 'inspectpd',
5
+ version = '0.1.0',
6
+ description = 'inspectpd: Inspection, Comparison and Visualisation of Data Frames',
7
+ url = 'http://github.com/alastairrushworth/inspectpd',
8
+ author = 'Alastair Rushworth',
9
+ author_email = 'alastairmrushworth@gmail.com',
10
+ license = 'MIT',
11
+ packages = ['inspectpd'],
12
+ install_requires = ['numpy', 'pandas', 'plotnine', 'scipy'],
13
+ zip_safe = False,
14
+ test_suite='nose.collector',
15
+ tests_require=['nose']
16
+ )