statslibx 0.2.5__tar.gz → 0.2.6__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.
Files changed (31) hide show
  1. {statslibx-0.2.5/statslibx.egg-info → statslibx-0.2.6}/PKG-INFO +53 -19
  2. statslibx-0.2.6/README.md +90 -0
  3. {statslibx-0.2.5 → statslibx-0.2.6}/pyproject.toml +8 -3
  4. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/__init__.py +8 -1
  5. statslibx-0.2.6/statslibx/cli.py +241 -0
  6. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/__init__.py +2 -0
  7. statslibx-0.2.6/statslibx/viewx/__init__.py +14 -0
  8. {statslibx-0.2.5 → statslibx-0.2.6/statslibx.egg-info}/PKG-INFO +53 -19
  9. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx.egg-info/SOURCES.txt +4 -1
  10. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx.egg-info/requires.txt +1 -0
  11. statslibx-0.2.6/tests/test2.py +39 -0
  12. statslibx-0.2.6/tests/test3.py +1 -0
  13. statslibx-0.2.5/README.md +0 -59
  14. statslibx-0.2.5/statslibx/cli.py +0 -48
  15. {statslibx-0.2.5 → statslibx-0.2.6}/MANIFEST.in +0 -0
  16. {statslibx-0.2.5 → statslibx-0.2.6}/setup.cfg +0 -0
  17. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/computational.py +0 -0
  18. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/Cocoa_Bubbles_Investment_Nigeria_Ghana_1980_2023.xlsx +0 -0
  19. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/course_completion.csv +0 -0
  20. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/iris.csv +0 -0
  21. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/penguins.csv +0 -0
  22. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/sp500_companies.csv +0 -0
  23. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/datasets/titanic.csv +0 -0
  24. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/descriptive.py +0 -0
  25. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/inferential.py +0 -0
  26. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/preprocessing/__init__.py +0 -0
  27. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx/utils.py +0 -0
  28. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx.egg-info/dependency_links.txt +0 -0
  29. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx.egg-info/entry_points.txt +0 -0
  30. {statslibx-0.2.5 → statslibx-0.2.6}/statslibx.egg-info/top_level.txt +0 -0
  31. {statslibx-0.2.5 → statslibx-0.2.6}/tests/test1.py +0 -0
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statslibx
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: StatsLibx - Librería de estadística descriptiva, inferencial y computacional
5
5
  Author-email: Emmanuel Ascendra Perez <ascendraemmanuel@gmail.com>
6
6
  License: MIT
7
+ Project-URL: Documentation, https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html
8
+ Project-URL: Repository, https://ghostanalyst30.github.io/StatsLibX
7
9
  Classifier: Development Status :: 3 - Alpha
8
10
  Classifier: Intended Audience :: Science/Research
9
11
  Classifier: Topic :: Scientific/Engineering :: Mathematics
@@ -23,6 +25,7 @@ Requires-Dist: scikit-learn>=1.0
23
25
  Requires-Dist: statsmodels>=0.13
24
26
  Requires-Dist: seaborn>=0.11
25
27
  Requires-Dist: plotly>=5.0
28
+ Requires-Dist: viewx>=2.1
26
29
  Provides-Extra: viz
27
30
  Requires-Dist: seaborn>=0.11; extra == "viz"
28
31
  Requires-Dist: plotly>=5.0; extra == "viz"
@@ -30,9 +33,9 @@ Provides-Extra: advanced
30
33
  Requires-Dist: scikit-learn>=1.0; extra == "advanced"
31
34
  Requires-Dist: statsmodels>=0.13; extra == "advanced"
32
35
 
33
- # 📦 StatsLibX v2.5
36
+ # StatsLibX v2.6
34
37
 
35
- ![](https://github.com/GhostAnalyst30/StatsLibX/blob/main/StatsLibX.png)
38
+ ![](https://raw.githubusercontent.com/GhostAnalyst30/StatsLibX/main/StatsLibX.png)
36
39
 
37
40
  StatsLibX es un paquete de Python diseñado para proporcionar una solución sencilla, eficiente y flexible para manejar volumenes de datos.
38
41
 
@@ -42,22 +45,22 @@ Este proyecto surge con la idea de ofrecer una alternativa moderna, intuitiva y
42
45
  | **Documentacion:** | **GitHub del Proyecto:** |
43
46
  |-------------------|--------------------------|
44
47
  [Documentacion StatsLibX](https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html) | [Github/StatsLibX](https://github.com/GhostAnalyst30/StatsLibX)
45
- |**Version:** 0.2.5 | **Autor:** Emmanuel Ascendra |
48
+ |**Version:** 0.2.6 | **Autor:** Emmanuel Ascendra |
46
49
 
47
50
 
48
- ## Características principales
51
+ ## Características principales
49
52
 
50
- - Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
53
+ - Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
51
54
 
52
- - 🧩 Fácil de usar: una API limpia para que empieces en segundos.
55
+ - Fácil de usar: una API limpia para que empieces en segundos.
53
56
 
54
- - 🔧 Altamente extensible: personalízalo según tus necesidades.
57
+ - Altamente extensible: personalízalo según tus necesidades.
55
58
 
56
- - 📚 Documentación clara: ejemplos simples y prácticos.
59
+ - Documentación clara: ejemplos simples y prácticos.
57
60
 
58
- - 🔮 Diseñado con visión a futuro: construido para escalar y adaptarse.
61
+ - Diseñado con visión a futuro: construido para escalar y adaptarse.
59
62
 
60
- ## 🚀 Ejemplo rápido
63
+ ## Ejemplo rápido
61
64
  ```python
62
65
  from statslibx import DescriptiveStats, InferentialStats, ComputationalStats, UtilsStats
63
66
  from statslibx.datasets import load_iris()
@@ -69,22 +72,53 @@ stats = DescriptiveStats(data)
69
72
 
70
73
  stats.summary()
71
74
  ```
72
- Para ver mas funciones: [https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
75
+ Para ver mas funciones: [StatslibX](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
73
76
 
74
- ## 📦 Instalación
77
+ ## Instalación
75
78
  ```bash
76
79
  pip install statslibx
77
80
  ```
78
81
 
79
- ## 👩‍💻 ¡Usalo en la terminal! (De forma preliminar)
82
+ ## Implementacion con ViewX
83
+
84
+ ```python
85
+ from statslibx.viewx import HTML, Slides, Report, DataMatrix
86
+ ```
87
+ ![ViewX](https://raw.githubusercontent.com/GhostAnalyst30/ViewX/main/images_for_git/DashBoard_Example.png)
88
+
89
+ Para saber mas: [ViewX](https://ghostanalyst30.github.io/ViewX/Documentation_Page/index.html)
90
+
91
+ ## ¡Usalo en la terminal!
80
92
  ```bash
81
- statslibx # Informacion general de la libreria
82
- statslibx describe .\archive.csv # Devuelve una descripcion de la data
83
- statslibx quality .\archive.csv # Devuelve la calidad de los datos
84
- statslibx preview .\archive.csv # Devuelve una visualizacion de los datos
93
+ # Data
94
+ statslibx data iris.csv
95
+
96
+ statslibx data mi_archivo.csv --summary --types --missing
97
+
98
+ # Info
99
+ statslibx info iris.csv
100
+
101
+ statslibx info iris.csv --detailed
102
+
103
+ # Describe
104
+ statslibx describe iris.csv --numeric
105
+
106
+ statslibx describe iris.csv --categorical
107
+
108
+ statslibx describe iris.csv
109
+
110
+ # Quality
111
+ statslibx quality iris.csv
112
+
113
+ statslibx quality iris.csv --verbose
114
+
115
+ # Preview
116
+ statslibx preview iris.csv -n 10
117
+
118
+ statslibx preview iris.csv -n 5 --sample
85
119
  ```
86
120
 
87
- 🤝 Contribuciones
121
+ ## Contribuciones
88
122
 
89
123
  ¡Todas las mejoras e ideas son bienvenidas!
90
124
 
@@ -0,0 +1,90 @@
1
+ # StatsLibX v2.6
2
+
3
+ ![](https://raw.githubusercontent.com/GhostAnalyst30/StatsLibX/main/StatsLibX.png)
4
+
5
+ StatsLibX es un paquete de Python diseñado para proporcionar una solución sencilla, eficiente y flexible para manejar volumenes de datos.
6
+
7
+ Este proyecto surge con la idea de ofrecer una alternativa moderna, intuitiva y ligera que permita a desarrolladores y entusiastas integrar la **estadistica descriptiva, inferencial y computacional** sin complicaciones, con multiples funcionalidades y utilidades pensadas para el futuro.
8
+
9
+
10
+ | **Documentacion:** | **GitHub del Proyecto:** |
11
+ |-------------------|--------------------------|
12
+ [Documentacion StatsLibX](https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html) | [Github/StatsLibX](https://github.com/GhostAnalyst30/StatsLibX)
13
+ |**Version:** 0.2.6 | **Autor:** Emmanuel Ascendra |
14
+
15
+
16
+ ## Características principales
17
+
18
+ - Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
19
+
20
+ - Fácil de usar: una API limpia para que empieces en segundos.
21
+
22
+ - Altamente extensible: personalízalo según tus necesidades.
23
+
24
+ - Documentación clara: ejemplos simples y prácticos.
25
+
26
+ - Diseñado con visión a futuro: construido para escalar y adaptarse.
27
+
28
+ ## Ejemplo rápido
29
+ ```python
30
+ from statslibx import DescriptiveStats, InferentialStats, ComputationalStats, UtilsStats
31
+ from statslibx.datasets import load_iris()
32
+
33
+ data = load_iris()
34
+
35
+ stats = DescriptiveStats(data)
36
+ # InferentialStats(data), ComputationalStats(data), UtilsStats()
37
+
38
+ stats.summary()
39
+ ```
40
+ Para ver mas funciones: [StatslibX](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
41
+
42
+ ## Instalación
43
+ ```bash
44
+ pip install statslibx
45
+ ```
46
+
47
+ ## Implementacion con ViewX
48
+
49
+ ```python
50
+ from statslibx.viewx import HTML, Slides, Report, DataMatrix
51
+ ```
52
+ ![ViewX](https://raw.githubusercontent.com/GhostAnalyst30/ViewX/main/images_for_git/DashBoard_Example.png)
53
+
54
+ Para saber mas: [ViewX](https://ghostanalyst30.github.io/ViewX/Documentation_Page/index.html)
55
+
56
+ ## ¡Usalo en la terminal!
57
+ ```bash
58
+ # Data
59
+ statslibx data iris.csv
60
+
61
+ statslibx data mi_archivo.csv --summary --types --missing
62
+
63
+ # Info
64
+ statslibx info iris.csv
65
+
66
+ statslibx info iris.csv --detailed
67
+
68
+ # Describe
69
+ statslibx describe iris.csv --numeric
70
+
71
+ statslibx describe iris.csv --categorical
72
+
73
+ statslibx describe iris.csv
74
+
75
+ # Quality
76
+ statslibx quality iris.csv
77
+
78
+ statslibx quality iris.csv --verbose
79
+
80
+ # Preview
81
+ statslibx preview iris.csv -n 10
82
+
83
+ statslibx preview iris.csv -n 5 --sample
84
+ ```
85
+
86
+ ## Contribuciones
87
+
88
+ ¡Todas las mejoras e ideas son bienvenidas!
89
+
90
+ E-mail: ascendraemmanuel@gmail.com
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "statslibx"
7
- version = "0.2.5"
7
+ version = "0.2.6"
8
8
  description = "StatsLibx - Librería de estadística descriptiva, inferencial y computacional"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -34,7 +34,8 @@ dependencies = [
34
34
  "scikit-learn>=1.0",
35
35
  "statsmodels>=0.13",
36
36
  "seaborn>=0.11",
37
- "plotly>=5.0"
37
+ "plotly>=5.0",
38
+ "viewx>=2.1"
38
39
  ]
39
40
 
40
41
  [project.optional-dependencies]
@@ -45,7 +46,11 @@ advanced = ["scikit-learn>=1.0", "statsmodels>=0.13"]
45
46
  statslibx = "statslibx.cli:main"
46
47
 
47
48
  [tool.setuptools.package-data]
48
- mi_libreria = ["datasets/*.csv", "datasets/*.xlsx"]
49
+ statslibx = ["datasets/*.csv", "datasets/*.xlsx"]
49
50
 
50
51
  [tool.setuptools.packages.find]
51
52
  where = ["."]
53
+
54
+ [project.urls]
55
+ Documentation = "https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html"
56
+ Repository = "https://ghostanalyst30.github.io/StatsLibX"
@@ -14,6 +14,7 @@ from .computational import ComputationalStats
14
14
  from .utils import UtilsStats
15
15
  from .preprocessing import Preprocessing
16
16
  from .datasets import load_dataset, generate_dataset
17
+ from .viewx import HTML, Slides, Report, DataMatrix
17
18
 
18
19
  # Definir qué se expone cuando se hace: from statslib import *
19
20
  __all__ = [
@@ -25,7 +26,13 @@ __all__ = [
25
26
  'UtilsStats',
26
27
  'Preprocessing',
27
28
  'load_dataset',
28
- 'generate_dataset'
29
+ 'generate_dataset',
30
+
31
+ # Viewx
32
+ 'HTML',
33
+ 'Slides',
34
+ 'Report',
35
+ 'DataMatrix'
29
36
  ]
30
37
 
31
38
  # Mensaje de bienvenida (opcional)
@@ -0,0 +1,241 @@
1
+ import argparse
2
+ import statslibx as slx
3
+ from statslibx.datasets import load_dataset
4
+ from statslibx.preprocessing import Preprocessing
5
+ import pandas as pd
6
+
7
+
8
+ def main():
9
+ parser = argparse.ArgumentParser(
10
+ prog="statslibx",
11
+ description="Statslibx - Data analysis from terminal"
12
+ )
13
+
14
+ subparsers = parser.add_subparsers(dest="command", help="Comandos disponibles")
15
+
16
+ # describe - Estadísticas descriptivas completas
17
+ describe = subparsers.add_parser("describe", help="Estadísticas descriptivas")
18
+ describe.add_argument("file", help="Ruta del archivo o nombre del dataset (ej: iris, titanic)")
19
+ describe.add_argument("-n", "--numeric", action="store_true", help="Solo columnas numéricas")
20
+ describe.add_argument("-c", "--categorical", action="store_true", help="Solo columnas categóricas")
21
+
22
+ # quality - Calidad de datos
23
+ quality = subparsers.add_parser("quality", help="Reporte de calidad de datos")
24
+ quality.add_argument("file", help="Ruta del archivo o nombre del dataset")
25
+ quality.add_argument("-v", "--verbose", action="store_true", help="Mostrar detalles")
26
+
27
+ # preview - Vista previa
28
+ preview = subparsers.add_parser("preview", help="Vista previa de los datos")
29
+ preview.add_argument("file", help="Ruta del archivo o nombre del dataset")
30
+ preview.add_argument("-n", "--rows", type=int, default=5, help="Número de filas (default: 5)")
31
+ preview.add_argument("-s", "--sample", action="store_true", help="Muestra aleatoria")
32
+
33
+ # info - Información completa del dataset (NUEVO)
34
+ info = subparsers.add_parser("info", help="Información completa del dataset")
35
+ info.add_argument("file", help="Ruta del archivo o nombre del dataset")
36
+ info.add_argument("-d", "--detailed", action="store_true", help="Información detallada (tipos, nulos, memoria)")
37
+
38
+ # data - Comando específico que pediste
39
+ data = subparsers.add_parser("data", help="Resumen del dataset (filas, columnas, tipos)")
40
+ data.add_argument("file", help="Ruta del archivo o nombre del dataset (ej: iris, titanic, o archivo.csv)")
41
+ data.add_argument("-s", "--summary", action="store_true", help="Mostrar resumen estadístico básico")
42
+ data.add_argument("-t", "--types", action="store_true", help="Mostrar tipos de datos")
43
+ data.add_argument("-m", "--missing", action="store_true", help="Mostrar valores faltantes")
44
+
45
+ args = parser.parse_args()
46
+
47
+ if not args.command:
48
+ print(slx.welcome())
49
+ return
50
+
51
+ # Cargar datos (soporta datasets internos y archivos externos)
52
+ df = load_dataset(args.file)
53
+
54
+ # Verificar si los datos se cargaron correctamente
55
+ if df is None or df.empty:
56
+ print(f"❌ Error: No se pudieron cargar los datos desde '{args.file}'")
57
+ return
58
+
59
+ pp = Preprocessing(df)
60
+
61
+ # Comando: describe
62
+ if args.command == "describe":
63
+ print("\n" + "="*80)
64
+ print(f"📊 ESTADÍSTICAS DESCRIPTIVAS - {args.file.upper()}")
65
+ print("="*80)
66
+
67
+ if args.numeric:
68
+ print(pp.describe_numeric())
69
+ elif args.categorical:
70
+ print(pp.describe_categorical() if hasattr(pp, 'describe_categorical') else df.describe(include=['object', 'category']))
71
+ else:
72
+ # Mostrar ambas
73
+ print("\n📈 Variables Numéricas:")
74
+ print(pp.describe_numeric())
75
+ print("\n📝 Variables Categóricas:")
76
+ if hasattr(pp, 'describe_categorical'):
77
+ print(pp.describe_categorical())
78
+ else:
79
+ print(df.describe(include=['object', 'category']))
80
+
81
+ # Comando: quality
82
+ elif args.command == "quality":
83
+ print("\n" + "="*80)
84
+ print(f"🔍 CALIDAD DE DATOS - {args.file.upper()}")
85
+ print("="*80)
86
+ quality_report = pp.data_quality()
87
+ print(quality_report)
88
+
89
+ if args.verbose and hasattr(pp, 'missing_details'):
90
+ print("\n📋 Detalle de valores faltantes:")
91
+ print(pp.missing_details())
92
+
93
+ # Comando: preview
94
+ elif args.command == "preview":
95
+ print("\n" + "="*80)
96
+ print(f"👁️ VISTA PREVIA - {args.file.upper()}")
97
+ print("="*80)
98
+
99
+ if args.sample:
100
+ print(f"\n🎲 Muestra aleatoria de {args.rows} filas:")
101
+ print(df.sample(min(args.rows, len(df))))
102
+ else:
103
+ print(f"\n📄 Primeras {args.rows} filas:")
104
+ print(pp.preview_data(args.rows))
105
+
106
+ # Comando: info (nuevo - información completa)
107
+ elif args.command == "info":
108
+ print("\n" + "="*80)
109
+ print(f"ℹ️ INFORMACIÓN DEL DATASET - {args.file.upper()}")
110
+ print("="*80)
111
+
112
+ # Información básica
113
+ print(f"\n📏 Dimensiones: {df.shape[0]} filas × {df.shape[1]} columnas")
114
+ print(f"💾 Memoria: {df.memory_usage(deep=True).sum() / 1024:.2f} KB")
115
+
116
+ print(f"\n📋 Columnas ({len(df.columns)}):")
117
+ for i, col in enumerate(df.columns, 1):
118
+ print(f" {i:3d}. {col}")
119
+
120
+ if args.detailed:
121
+ print("\n🔧 Tipos de datos:")
122
+ print(df.dtypes)
123
+
124
+ print("\n⚠️ Valores nulos:")
125
+ nulls = df.isnull().sum()
126
+ null_pct = (nulls / len(df)) * 100
127
+ null_df = pd.DataFrame({
128
+ 'Nulos': nulls,
129
+ 'Porcentaje': null_pct
130
+ })
131
+ print(null_df[null_df['Nulos'] > 0] if (nulls > 0).any() else "✅ No hay valores nulos")
132
+
133
+ print("\n🔄 Valores únicos por columna:")
134
+ for col in df.columns:
135
+ unique_count = df[col].nunique()
136
+ print(f" {col}: {unique_count:,} únicos")
137
+
138
+ # Comando: data (el que pediste específicamente)
139
+ elif args.command == "data":
140
+ print("\n" + "="*80)
141
+ print(f"📊 RESUMEN DEL DATASET - {args.file.upper()}")
142
+ print("="*80)
143
+
144
+ # Información básica siempre visible
145
+ print(f"\n📏 Dimensiones:")
146
+ print(f" • Filas: {df.shape[0]:,}")
147
+ print(f" • Columnas: {df.shape[1]:,}")
148
+
149
+ print(f"\n📋 Columnas:")
150
+ for i, col in enumerate(df.columns, 1):
151
+ dtype = df[col].dtype
152
+ nulls = df[col].isnull().sum()
153
+ unique = df[col].nunique()
154
+ print(f" {i:2d}. {col:20s} | Tipo: {str(dtype):12s} | Nulos: {nulls:4d} | Únicos: {unique:,}")
155
+
156
+ if args.types:
157
+ print(f"\n🔧 Tipos de datos detallados:")
158
+ print(df.dtypes.to_string())
159
+
160
+ if args.missing:
161
+ missing = df.isnull().sum()
162
+ missing_pct = (missing / len(df)) * 100
163
+ missing_data = missing[missing > 0]
164
+ if len(missing_data) > 0:
165
+ print(f"\n⚠️ Valores faltantes:")
166
+ for col, nulos in missing_data.items():
167
+ print(f" • {col}: {nulos:,} ({missing_pct[col]:.1f}%)")
168
+ else:
169
+ print(f"\n✅ No hay valores faltantes")
170
+
171
+ if args.summary:
172
+ print(f"\n📈 Resumen estadístico rápido:")
173
+ numeric_cols = df.select_dtypes(include=['number']).columns
174
+ if len(numeric_cols) > 0:
175
+ print(f"\n Variables numéricas ({len(numeric_cols)}):")
176
+ for col in numeric_cols[:5]: # Mostrar primeras 5 numéricas
177
+ print(f" • {col}:")
178
+ print(f" Mín: {df[col].min():.2f} | Máx: {df[col].max():.2f}")
179
+ print(f" Media: {df[col].mean():.2f} | Mediana: {df[col].median():.2f}")
180
+ if len(numeric_cols) > 5:
181
+ print(f" ... y {len(numeric_cols)-5} columnas numéricas más")
182
+ else:
183
+ print(" No hay variables numéricas")
184
+
185
+ categorical_cols = df.select_dtypes(include=['object', 'category']).columns
186
+ if len(categorical_cols) > 0:
187
+ print(f"\n Variables categóricas ({len(categorical_cols)}):")
188
+ for col in categorical_cols[:3]:
189
+ top_value = df[col].mode().iloc[0] if not df[col].mode().empty else "N/A"
190
+ print(f" • {col}: {df[col].nunique():,} categorías (Moda: {top_value})")
191
+ if len(categorical_cols) > 3:
192
+ print(f" ... y {len(categorical_cols)-3} columnas categóricas más")
193
+
194
+ else:
195
+ print(f"❌ Comando desconocido: {args.command}")
196
+
197
+ """
198
+ # Básico - muestra dimensiones y columnas
199
+ statslibx data iris.csv
200
+
201
+ # Con resumen estadístico
202
+ statslibx data iris.csv --summary
203
+
204
+ # Con tipos de datos
205
+ statslibx data iris.csv --types
206
+
207
+ # Con valores faltantes
208
+ statslibx data iris.csv --missing
209
+
210
+ statslibx data mi_archivo.csv --summary --types --missing
211
+
212
+ # Información completa
213
+ statslibx info iris.csv
214
+
215
+ # Con detalles avanzados
216
+ statslibx info iris.csv --detailed
217
+
218
+ # Solo numéricas
219
+ statslibx describe iris.csv --numeric
220
+
221
+ # Solo categóricas
222
+ statslibx describe iris.csv --categorical
223
+
224
+ statslibx describe iris.csv
225
+
226
+ # Reporte básico
227
+ statslibx quality iris.csv
228
+
229
+ # Con verbose
230
+ statslibx quality iris.csv --verbose
231
+
232
+ # Primeras filas
233
+ statslibx preview iris.csv -n 10
234
+
235
+ # Muestra aleatoria
236
+ statslibx preview iris.csv -n 5 --sample
237
+ """
238
+
239
+
240
+ if __name__ == "__main__":
241
+ main()
@@ -110,6 +110,8 @@ def load_dataset(
110
110
  resource_name = path.name
111
111
  ext = path.suffix.lower()
112
112
 
113
+ if ext == "":
114
+ ext = ".csv"
113
115
 
114
116
  if ext not in _SUPPORTED_EXTENSIONS:
115
117
  raise ValueError(
@@ -0,0 +1,14 @@
1
+ from viewx import (
2
+ HTML,
3
+ Slides,
4
+ Report,
5
+ DataMatrix
6
+ )
7
+
8
+ __all__ = [
9
+ "HTML",
10
+ "DashBoard",
11
+ "Slides",
12
+ "Report",
13
+ "DataMatrix"
14
+ ]
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statslibx
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: StatsLibx - Librería de estadística descriptiva, inferencial y computacional
5
5
  Author-email: Emmanuel Ascendra Perez <ascendraemmanuel@gmail.com>
6
6
  License: MIT
7
+ Project-URL: Documentation, https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html
8
+ Project-URL: Repository, https://ghostanalyst30.github.io/StatsLibX
7
9
  Classifier: Development Status :: 3 - Alpha
8
10
  Classifier: Intended Audience :: Science/Research
9
11
  Classifier: Topic :: Scientific/Engineering :: Mathematics
@@ -23,6 +25,7 @@ Requires-Dist: scikit-learn>=1.0
23
25
  Requires-Dist: statsmodels>=0.13
24
26
  Requires-Dist: seaborn>=0.11
25
27
  Requires-Dist: plotly>=5.0
28
+ Requires-Dist: viewx>=2.1
26
29
  Provides-Extra: viz
27
30
  Requires-Dist: seaborn>=0.11; extra == "viz"
28
31
  Requires-Dist: plotly>=5.0; extra == "viz"
@@ -30,9 +33,9 @@ Provides-Extra: advanced
30
33
  Requires-Dist: scikit-learn>=1.0; extra == "advanced"
31
34
  Requires-Dist: statsmodels>=0.13; extra == "advanced"
32
35
 
33
- # 📦 StatsLibX v2.5
36
+ # StatsLibX v2.6
34
37
 
35
- ![](https://github.com/GhostAnalyst30/StatsLibX/blob/main/StatsLibX.png)
38
+ ![](https://raw.githubusercontent.com/GhostAnalyst30/StatsLibX/main/StatsLibX.png)
36
39
 
37
40
  StatsLibX es un paquete de Python diseñado para proporcionar una solución sencilla, eficiente y flexible para manejar volumenes de datos.
38
41
 
@@ -42,22 +45,22 @@ Este proyecto surge con la idea de ofrecer una alternativa moderna, intuitiva y
42
45
  | **Documentacion:** | **GitHub del Proyecto:** |
43
46
  |-------------------|--------------------------|
44
47
  [Documentacion StatsLibX](https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html) | [Github/StatsLibX](https://github.com/GhostAnalyst30/StatsLibX)
45
- |**Version:** 0.2.5 | **Autor:** Emmanuel Ascendra |
48
+ |**Version:** 0.2.6 | **Autor:** Emmanuel Ascendra |
46
49
 
47
50
 
48
- ## Características principales
51
+ ## Características principales
49
52
 
50
- - Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
53
+ - Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
51
54
 
52
- - 🧩 Fácil de usar: una API limpia para que empieces en segundos.
55
+ - Fácil de usar: una API limpia para que empieces en segundos.
53
56
 
54
- - 🔧 Altamente extensible: personalízalo según tus necesidades.
57
+ - Altamente extensible: personalízalo según tus necesidades.
55
58
 
56
- - 📚 Documentación clara: ejemplos simples y prácticos.
59
+ - Documentación clara: ejemplos simples y prácticos.
57
60
 
58
- - 🔮 Diseñado con visión a futuro: construido para escalar y adaptarse.
61
+ - Diseñado con visión a futuro: construido para escalar y adaptarse.
59
62
 
60
- ## 🚀 Ejemplo rápido
63
+ ## Ejemplo rápido
61
64
  ```python
62
65
  from statslibx import DescriptiveStats, InferentialStats, ComputationalStats, UtilsStats
63
66
  from statslibx.datasets import load_iris()
@@ -69,22 +72,53 @@ stats = DescriptiveStats(data)
69
72
 
70
73
  stats.summary()
71
74
  ```
72
- Para ver mas funciones: [https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
75
+ Para ver mas funciones: [StatslibX](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
73
76
 
74
- ## 📦 Instalación
77
+ ## Instalación
75
78
  ```bash
76
79
  pip install statslibx
77
80
  ```
78
81
 
79
- ## 👩‍💻 ¡Usalo en la terminal! (De forma preliminar)
82
+ ## Implementacion con ViewX
83
+
84
+ ```python
85
+ from statslibx.viewx import HTML, Slides, Report, DataMatrix
86
+ ```
87
+ ![ViewX](https://raw.githubusercontent.com/GhostAnalyst30/ViewX/main/images_for_git/DashBoard_Example.png)
88
+
89
+ Para saber mas: [ViewX](https://ghostanalyst30.github.io/ViewX/Documentation_Page/index.html)
90
+
91
+ ## ¡Usalo en la terminal!
80
92
  ```bash
81
- statslibx # Informacion general de la libreria
82
- statslibx describe .\archive.csv # Devuelve una descripcion de la data
83
- statslibx quality .\archive.csv # Devuelve la calidad de los datos
84
- statslibx preview .\archive.csv # Devuelve una visualizacion de los datos
93
+ # Data
94
+ statslibx data iris.csv
95
+
96
+ statslibx data mi_archivo.csv --summary --types --missing
97
+
98
+ # Info
99
+ statslibx info iris.csv
100
+
101
+ statslibx info iris.csv --detailed
102
+
103
+ # Describe
104
+ statslibx describe iris.csv --numeric
105
+
106
+ statslibx describe iris.csv --categorical
107
+
108
+ statslibx describe iris.csv
109
+
110
+ # Quality
111
+ statslibx quality iris.csv
112
+
113
+ statslibx quality iris.csv --verbose
114
+
115
+ # Preview
116
+ statslibx preview iris.csv -n 10
117
+
118
+ statslibx preview iris.csv -n 5 --sample
85
119
  ```
86
120
 
87
- 🤝 Contribuciones
121
+ ## Contribuciones
88
122
 
89
123
  ¡Todas las mejoras e ideas son bienvenidas!
90
124
 
@@ -21,4 +21,7 @@ statslibx/datasets/penguins.csv
21
21
  statslibx/datasets/sp500_companies.csv
22
22
  statslibx/datasets/titanic.csv
23
23
  statslibx/preprocessing/__init__.py
24
- tests/test1.py
24
+ statslibx/viewx/__init__.py
25
+ tests/test1.py
26
+ tests/test2.py
27
+ tests/test3.py
@@ -6,6 +6,7 @@ scikit-learn>=1.0
6
6
  statsmodels>=0.13
7
7
  seaborn>=0.11
8
8
  plotly>=5.0
9
+ viewx>=2.1
9
10
 
10
11
  [advanced]
11
12
  scikit-learn>=1.0
@@ -0,0 +1,39 @@
1
+ from statslibx.viewx import HTML
2
+ from statslibx.datasets import load_iris
3
+ import plotly.express as px
4
+
5
+ data = load_iris()
6
+
7
+ page = HTML(
8
+ data=data,
9
+ title="Iris DashBoard",
10
+ num_cols=2,
11
+ num_rows=2,
12
+ theme="dark"
13
+ )
14
+
15
+ page.add_text(
16
+ content="""Este dashboard fue hecho con el fin
17
+ de poner a prueba la herramienta de Viewx\n
18
+ \t\t\t- Emmanuel Ascendra""",
19
+ slot_grid=(1, 1, 1, 1)
20
+ )
21
+
22
+ page.add_table(
23
+ df=data.head(10),
24
+ title="Dataset de Iris",
25
+ slot_grid=(1, 2, 1, 1)
26
+ )
27
+
28
+ scatter_plot = px.scatter(
29
+ data_frame=data,
30
+ x="sepal_length",
31
+ y="petal_length"
32
+ )
33
+
34
+ page.add_plot(
35
+ fig=scatter_plot,
36
+ slot_grid=(2, 1, 1, 4)
37
+ )
38
+
39
+ page.generate(filename="Dashboard_Iris.html")
@@ -0,0 +1 @@
1
+ from statslibx.viewx import HTML
statslibx-0.2.5/README.md DELETED
@@ -1,59 +0,0 @@
1
- # 📦 StatsLibX v2.5
2
-
3
- ![](https://github.com/GhostAnalyst30/StatsLibX/blob/main/StatsLibX.png)
4
-
5
- StatsLibX es un paquete de Python diseñado para proporcionar una solución sencilla, eficiente y flexible para manejar volumenes de datos.
6
-
7
- Este proyecto surge con la idea de ofrecer una alternativa moderna, intuitiva y ligera que permita a desarrolladores y entusiastas integrar la **estadistica descriptiva, inferencial y computacional** sin complicaciones, con multiples funcionalidades y utilidades pensadas para el futuro.
8
-
9
-
10
- | **Documentacion:** | **GitHub del Proyecto:** |
11
- |-------------------|--------------------------|
12
- [Documentacion StatsLibX](https://ghostanalyst30.github.io/StatsLibX/Documentation_Page/index.html) | [Github/StatsLibX](https://github.com/GhostAnalyst30/StatsLibX)
13
- |**Version:** 0.2.5 | **Autor:** Emmanuel Ascendra |
14
-
15
-
16
- ## ✨ Características principales
17
-
18
- - ⚡ Rápido y eficiente: optimizado para ofrecer un rendimiento suave incluso en tareas exigentes.
19
-
20
- - 🧩 Fácil de usar: una API limpia para que empieces en segundos.
21
-
22
- - 🔧 Altamente extensible: personalízalo según tus necesidades.
23
-
24
- - 📚 Documentación clara: ejemplos simples y prácticos.
25
-
26
- - 🔮 Diseñado con visión a futuro: construido para escalar y adaptarse.
27
-
28
- ## 🚀 Ejemplo rápido
29
- ```python
30
- from statslibx import DescriptiveStats, InferentialStats, ComputationalStats, UtilsStats
31
- from statslibx.datasets import load_iris()
32
-
33
- data = load_iris()
34
-
35
- stats = DescriptiveStats(data)
36
- # InferentialStats(data), ComputationalStats(data), UtilsStats()
37
-
38
- stats.summary()
39
- ```
40
- Para ver mas funciones: [https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb](https://github.com/GhostAnalyst30/StatsLibX/blob/main/how_use_statslibx.ipynb)
41
-
42
- ## 📦 Instalación
43
- ```bash
44
- pip install statslibx
45
- ```
46
-
47
- ## 👩‍💻 ¡Usalo en la terminal! (De forma preliminar)
48
- ```bash
49
- statslibx # Informacion general de la libreria
50
- statslibx describe .\archive.csv # Devuelve una descripcion de la data
51
- statslibx quality .\archive.csv # Devuelve la calidad de los datos
52
- statslibx preview .\archive.csv # Devuelve una visualizacion de los datos
53
- ```
54
-
55
- 🤝 Contribuciones
56
-
57
- ¡Todas las mejoras e ideas son bienvenidas!
58
-
59
- E-mail: ascendraemmanuel@gmail.com
@@ -1,48 +0,0 @@
1
- import argparse
2
- import statslibx as slx
3
- from statslibx.datasets import load_dataset
4
- from statslibx.preprocessing import Preprocessing
5
-
6
-
7
- def main():
8
- parser = argparse.ArgumentParser(
9
- prog="statslibx",
10
- description="Statslibx - Data analysis from terminal"
11
- )
12
-
13
- subparsers = parser.add_subparsers(dest="command")
14
-
15
- # describe
16
- describe = subparsers.add_parser("describe")
17
- describe.add_argument("file")
18
-
19
- # quality
20
- quality = subparsers.add_parser("quality")
21
- quality.add_argument("file")
22
-
23
- # preview
24
- preview = subparsers.add_parser("preview")
25
- preview.add_argument("file")
26
- preview.add_argument("-n", "--rows", type=int, default=5)
27
-
28
- args = parser.parse_args()
29
-
30
- if not args.command:
31
- print(slx.welcome())
32
- return
33
-
34
- df = load_dataset(args.file)
35
- pp = Preprocessing(df)
36
-
37
- if args.command == "describe":
38
- print(pp.describe_numeric())
39
-
40
- elif args.command == "quality":
41
- print(pp.data_quality())
42
-
43
- elif args.command == "preview":
44
- print(pp.preview_data(args.rows))
45
-
46
-
47
- if __name__ == "__main__":
48
- main()
File without changes
File without changes
File without changes
File without changes