qdesc 0.1.3__tar.gz → 0.1.5__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.
Potentially problematic release.
This version of qdesc might be problematic. Click here for more details.
- {qdesc-0.1.3/qdesc.egg-info → qdesc-0.1.5}/PKG-INFO +8 -1
- qdesc-0.1.3/PKG-INFO → qdesc-0.1.5/README.md +64 -66
- {qdesc-0.1.3 → qdesc-0.1.5}/qdesc/__init__.py +19 -1
- qdesc-0.1.5/qdesc.egg-info/PKG-INFO +73 -0
- {qdesc-0.1.3 → qdesc-0.1.5}/qdesc.egg-info/SOURCES.txt +1 -1
- {qdesc-0.1.3 → qdesc-0.1.5}/setup.py +1 -1
- qdesc-0.1.3/README.txt +0 -22
- {qdesc-0.1.3 → qdesc-0.1.5}/LICENCE.txt +0 -0
- {qdesc-0.1.3 → qdesc-0.1.5}/qdesc.egg-info/dependency_links.txt +0 -0
- {qdesc-0.1.3 → qdesc-0.1.5}/qdesc.egg-info/top_level.txt +0 -0
- {qdesc-0.1.3 → qdesc-0.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qdesc
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Quick and Easy way to do descriptive analysis.
|
|
5
5
|
Author: Paolo Hilado
|
|
6
6
|
Author-email: datasciencepgh@proton.me
|
|
@@ -38,6 +38,13 @@ Run the function qd.freqdist(df, "Variable Name") to easily create a frequency d
|
|
|
38
38
|
* Counts - the number of observations
|
|
39
39
|
* Percentage - percentage of observations from total.
|
|
40
40
|
|
|
41
|
+
Run the function qd.freqdist_a(df, ascending = FALSE) to easily create frequency distribution tables, arranged in descending manner (default) or ascending (TRUE), for all
|
|
42
|
+
the categorical variables in your data frame. The resulting table will include columns such as:
|
|
43
|
+
* Variable levels (i.e., for Satisfaction: Very Low, Low, Moderate, High, Very High)
|
|
44
|
+
* Counts - the number of observations
|
|
45
|
+
* Percentage - percentage of observations from total.
|
|
46
|
+
|
|
47
|
+
|
|
41
48
|
Later versions will include data visualizations handy for exploring the distribution of the data set.
|
|
42
49
|
|
|
43
50
|
## Installation
|
|
@@ -1,66 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
###
|
|
57
|
-
|
|
58
|
-
###
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
# qdesc - Quick and Easy Descriptive Analysis
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
This is a package for quick and easy descriptive analysis.
|
|
5
|
+
Required packages include: pandas, numpy, and SciPy version 1.14.1
|
|
6
|
+
Be sure to run the following prior to using the "qd.desc" function:
|
|
7
|
+
|
|
8
|
+
- import pandas as pd
|
|
9
|
+
- import numpy as np
|
|
10
|
+
- from scipy.stats import anderson
|
|
11
|
+
- import qdesc as qd
|
|
12
|
+
|
|
13
|
+
The qdesc package provides a quick and easy approach to do descriptive analysis for quantitative data.
|
|
14
|
+
|
|
15
|
+
Run the function qd.desc(df) to get the following statistics:
|
|
16
|
+
* count - number of observations
|
|
17
|
+
* mean - measure of central tendency for normal distribution
|
|
18
|
+
* std - measure of spread for normal distribution
|
|
19
|
+
* median - measure of central tendency for skewed distributions or those with outliers
|
|
20
|
+
* MAD - measure of spread for skewed distributions or those with outliers; this is manual Median Absolute Deviation (MAD) which is more robust when dealing with non-normal distributions.
|
|
21
|
+
* min - lowest observed value
|
|
22
|
+
* max - highest observed value
|
|
23
|
+
* AD_stat - Anderson - Darling Statistic
|
|
24
|
+
* 5% crit_value - critical value for a 5% Significance Level
|
|
25
|
+
* 1% crit_value - critical value for a 1% Significance Level
|
|
26
|
+
|
|
27
|
+
Run the function qd.freqdist(df, "Variable Name") to easily create a frequency distribution for your chosen categorical variable with the following:
|
|
28
|
+
* Variable Levels (i.e., for Sex Variable: Male and Female)
|
|
29
|
+
* Counts - the number of observations
|
|
30
|
+
* Percentage - percentage of observations from total.
|
|
31
|
+
|
|
32
|
+
Run the function qd.freqdist_a(df, ascending = FALSE) to easily create frequency distribution tables, arranged in descending manner (default) or ascending (TRUE), for all
|
|
33
|
+
the categorical variables in your data frame. The resulting table will include columns such as:
|
|
34
|
+
* Variable levels (i.e., for Satisfaction: Very Low, Low, Moderate, High, Very High)
|
|
35
|
+
* Counts - the number of observations
|
|
36
|
+
* Percentage - percentage of observations from total.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
Later versions will include data visualizations handy for exploring the distribution of the data set.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
pip install qdesc
|
|
43
|
+
|
|
44
|
+
## Usage - doing descriptive analysis using qdesc
|
|
45
|
+
### import qdesc as qd
|
|
46
|
+
### qd.desc(df)
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
This project is licensed under the GPL-3 License. See the LICENSE file for more details.
|
|
50
|
+
|
|
51
|
+
## Acknowledgements
|
|
52
|
+
Acknowledgement of the libraries used by this package...
|
|
53
|
+
|
|
54
|
+
### Pandas
|
|
55
|
+
Pandas is distributed under the BSD 3-Clause License, pandas is developed by Pandas contributors. Copyright (c) 2008-2024, the pandas development team All rights reserved.
|
|
56
|
+
### NumPy
|
|
57
|
+
NumPy is distributed under the BSD 3-Clause License, numpy is developed by NumPy contributors. Copyright (c) 2005-2024, NumPy Developers. All rights reserved.
|
|
58
|
+
### SciPy
|
|
59
|
+
SciPy is distributed under the BSD License, scipy is developed by SciPy contributors. Copyright (c) 2001-2024, SciPy Developers. All rights reserved.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
@@ -49,4 +49,22 @@ def freqdist(df, column_name):
|
|
|
49
49
|
freq_dist = df[column_name].value_counts().reset_index()
|
|
50
50
|
freq_dist.columns = [column_name, 'Count']
|
|
51
51
|
freq_dist['Percentage'] = (freq_dist['Count'] / len(df)) * 100
|
|
52
|
-
return freq_dist
|
|
52
|
+
return freq_dist
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def freqdist_a(df, ascending=False):
|
|
56
|
+
results = []
|
|
57
|
+
for column in df.select_dtypes(include=['object', 'category']).columns:
|
|
58
|
+
frequency_table = df[column].value_counts()
|
|
59
|
+
percentage_table = df[column].value_counts(normalize=True) * 100
|
|
60
|
+
|
|
61
|
+
distribution = pd.DataFrame({
|
|
62
|
+
'Column': column,
|
|
63
|
+
'Value': frequency_table.index,
|
|
64
|
+
'Count': frequency_table.values,
|
|
65
|
+
'Percentage': percentage_table.values
|
|
66
|
+
})
|
|
67
|
+
distribution = distribution.sort_values(by='Percentage', ascending=ascending)
|
|
68
|
+
results.append(distribution)
|
|
69
|
+
final_df = pd.concat(results, ignore_index=True)
|
|
70
|
+
return final_df
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: qdesc
|
|
3
|
+
Version: 0.1.5
|
|
4
|
+
Summary: Quick and Easy way to do descriptive analysis.
|
|
5
|
+
Author: Paolo Hilado
|
|
6
|
+
Author-email: datasciencepgh@proton.me
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENCE.txt
|
|
9
|
+
|
|
10
|
+
# qdesc - Quick and Easy Descriptive Analysis
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
This is a package for quick and easy descriptive analysis.
|
|
14
|
+
Required packages include: pandas, numpy, and SciPy version 1.14.1
|
|
15
|
+
Be sure to run the following prior to using the "qd.desc" function:
|
|
16
|
+
|
|
17
|
+
- import pandas as pd
|
|
18
|
+
- import numpy as np
|
|
19
|
+
- from scipy.stats import anderson
|
|
20
|
+
- import qdesc as qd
|
|
21
|
+
|
|
22
|
+
The qdesc package provides a quick and easy approach to do descriptive analysis for quantitative data.
|
|
23
|
+
|
|
24
|
+
Run the function qd.desc(df) to get the following statistics:
|
|
25
|
+
* count - number of observations
|
|
26
|
+
* mean - measure of central tendency for normal distribution
|
|
27
|
+
* std - measure of spread for normal distribution
|
|
28
|
+
* median - measure of central tendency for skewed distributions or those with outliers
|
|
29
|
+
* MAD - measure of spread for skewed distributions or those with outliers; this is manual Median Absolute Deviation (MAD) which is more robust when dealing with non-normal distributions.
|
|
30
|
+
* min - lowest observed value
|
|
31
|
+
* max - highest observed value
|
|
32
|
+
* AD_stat - Anderson - Darling Statistic
|
|
33
|
+
* 5% crit_value - critical value for a 5% Significance Level
|
|
34
|
+
* 1% crit_value - critical value for a 1% Significance Level
|
|
35
|
+
|
|
36
|
+
Run the function qd.freqdist(df, "Variable Name") to easily create a frequency distribution for your chosen categorical variable with the following:
|
|
37
|
+
* Variable Levels (i.e., for Sex Variable: Male and Female)
|
|
38
|
+
* Counts - the number of observations
|
|
39
|
+
* Percentage - percentage of observations from total.
|
|
40
|
+
|
|
41
|
+
Run the function qd.freqdist_a(df, ascending = FALSE) to easily create frequency distribution tables, arranged in descending manner (default) or ascending (TRUE), for all
|
|
42
|
+
the categorical variables in your data frame. The resulting table will include columns such as:
|
|
43
|
+
* Variable levels (i.e., for Satisfaction: Very Low, Low, Moderate, High, Very High)
|
|
44
|
+
* Counts - the number of observations
|
|
45
|
+
* Percentage - percentage of observations from total.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Later versions will include data visualizations handy for exploring the distribution of the data set.
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
pip install qdesc
|
|
52
|
+
|
|
53
|
+
## Usage - doing descriptive analysis using qdesc
|
|
54
|
+
### import qdesc as qd
|
|
55
|
+
### qd.desc(df)
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
This project is licensed under the GPL-3 License. See the LICENSE file for more details.
|
|
59
|
+
|
|
60
|
+
## Acknowledgements
|
|
61
|
+
Acknowledgement of the libraries used by this package...
|
|
62
|
+
|
|
63
|
+
### Pandas
|
|
64
|
+
Pandas is distributed under the BSD 3-Clause License, pandas is developed by Pandas contributors. Copyright (c) 2008-2024, the pandas development team All rights reserved.
|
|
65
|
+
### NumPy
|
|
66
|
+
NumPy is distributed under the BSD 3-Clause License, numpy is developed by NumPy contributors. Copyright (c) 2005-2024, NumPy Developers. All rights reserved.
|
|
67
|
+
### SciPy
|
|
68
|
+
SciPy is distributed under the BSD License, scipy is developed by SciPy contributors. Copyright (c) 2001-2024, SciPy Developers. All rights reserved.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
qdesc-0.1.3/README.txt
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
This is a package for quick and easy descriptive analysis.
|
|
2
|
-
Required packages include: pandas, numpy, and SciPy version 1.14.1
|
|
3
|
-
Be sure to run the following prior to using the "qd.desc" function:
|
|
4
|
-
|
|
5
|
-
import pandas as pd
|
|
6
|
-
import numpy as np
|
|
7
|
-
from scipy.stats import anderson
|
|
8
|
-
import qdesc as qd
|
|
9
|
-
|
|
10
|
-
The qdesc package provides a quick and easy approach to do descriptive analysis for quantitative data.
|
|
11
|
-
|
|
12
|
-
run the function qd.desc(df) to get the following statistics:
|
|
13
|
-
count - number of observations
|
|
14
|
-
mean - measure of central tendency for normal distribution
|
|
15
|
-
std - measure of spread for normal distribution
|
|
16
|
-
median - measure of central tendency for skewed distributions or those with outliers
|
|
17
|
-
MAD - measure of spread for skewed distributions or those with outliers; this is manual Median Absolute Deviation (MAD) which is more robust when dealing with non-normal distributions.
|
|
18
|
-
min - lowest observed value
|
|
19
|
-
max - highest observed value
|
|
20
|
-
AD_stat - Anderson - Darling Statistic
|
|
21
|
-
5% crit_value - critical value for a 5% Significance Level
|
|
22
|
-
1% crit_value - critical value for a 1% Significance Level
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|