kshri 0.2.1__tar.gz → 0.2.3__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.
kshri-0.2.3/PKG-INFO ADDED
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: kshri
3
+ Version: 0.2.3
4
+ Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
+ Author-email: Rishabh <rishabh@example.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/24f3003274-RISHABH/kshri
8
+ Project-URL: Repository, https://github.com/24f3003274-RISHABH/kshri
9
+ Project-URL: Issues, https://github.com
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+ # Kshri
18
+
19
+ [![PyPI version](https://fury.io)](https://pypi.org)
20
+ [![License: MIT](https://shields.io)](https://opensource.org)
21
+
22
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
23
+
24
+ ## Installation
25
+ ```bash
26
+ pip install kshri
27
+ ```
28
+
29
+ ## Quickstart: One-Line EDA Dashboard
30
+ ```python
31
+ from kshri import DataFrame, dashboard
32
+
33
+ df = DataFrame({
34
+ "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
35
+ "revenue": [1200000, 2500000, None, 980000]
36
+ })
37
+ dashboard(df)
38
+ ```
39
+
40
+ ## All Features & Functions
41
+
42
+ ### Data & EDA
43
+ * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
44
+ * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
45
+ * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
46
+ * **`roast(df)`**: Scans messy data and gives a brutally honest, funny data-quality report.
47
+ * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
48
+ * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
49
+
50
+ ### Math, Charts, ML & AI
51
+ * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
52
+ * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
53
+ * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
54
+ * **`cosine_similarity(vec1, vec2)`**: Vector similarity scoring for AI embeddings and RAG pipelines.
55
+ * **`to_llm_prompt(df)`**: Converts a DataFrame into a clean Markdown table ready for LLM prompts.
56
+ * **`indian_format(num_or_arr)`**: Formats numbers using the Indian numbering system (Lakhs & Crores).
57
+ * **`explain_like_im_5(arr)`**: Explains averages, medians, and outliers in plain English.
58
+ * **`chaotic_sort(arr)`**: Stress-tests data pipelines with controlled random swaps.
kshri-0.2.3/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Kshri
2
+
3
+ [![PyPI version](https://fury.io)](https://pypi.org)
4
+ [![License: MIT](https://shields.io)](https://opensource.org)
5
+
6
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
7
+
8
+ ## Installation
9
+ ```bash
10
+ pip install kshri
11
+ ```
12
+
13
+ ## Quickstart: One-Line EDA Dashboard
14
+ ```python
15
+ from kshri import DataFrame, dashboard
16
+
17
+ df = DataFrame({
18
+ "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
19
+ "revenue": [1200000, 2500000, None, 980000]
20
+ })
21
+ dashboard(df)
22
+ ```
23
+
24
+ ## All Features & Functions
25
+
26
+ ### Data & EDA
27
+ * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
28
+ * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
29
+ * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
30
+ * **`roast(df)`**: Scans messy data and gives a brutally honest, funny data-quality report.
31
+ * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
32
+ * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
33
+
34
+ ### Math, Charts, ML & AI
35
+ * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
36
+ * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
37
+ * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
38
+ * **`cosine_similarity(vec1, vec2)`**: Vector similarity scoring for AI embeddings and RAG pipelines.
39
+ * **`to_llm_prompt(df)`**: Converts a DataFrame into a clean Markdown table ready for LLM prompts.
40
+ * **`indian_format(num_or_arr)`**: Formats numbers using the Indian numbering system (Lakhs & Crores).
41
+ * **`explain_like_im_5(arr)`**: Explains averages, medians, and outliers in plain English.
42
+ * **`chaotic_sort(arr)`**: Stress-tests data pipelines with controlled random swaps.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kshri"
7
- version = "0.2.1"
7
+ version = "0.2.3"
8
8
  authors = [
9
9
  { name="Rishabh", email="rishabh@example.com" },
10
10
  ]
@@ -13,9 +13,9 @@ from .modern import (
13
13
  cosine_similarity,
14
14
  to_llm_prompt,
15
15
  )
16
- from .dashboard import dashboard
16
+ from .eda import dashboard
17
17
 
18
- __version__ = "0.2.1"
18
+ __version__ = "0.2.3"
19
19
  __all__ = [
20
20
  "Array",
21
21
  "DataFrame",
@@ -85,7 +85,7 @@ def dashboard(df, filename="kshri_dashboard.html", open_browser=True):
85
85
  <meta charset="UTF-8">
86
86
  <title>Kshri EDA Dashboard</title>
87
87
  <style>
88
- body {{ font-family: system-ui, -apple-system, sans-serif; background: #0f172a; color: #f8fafc; margin: 0; padding: 24px; }}
88
+ body {{ font-family: system-ui, -apple-system, sans-serif; background: #0f172a; color: #f8fafc; margin: 0; padding: 24px; } h1, h2 { color: #f8fafc !important; }}
89
89
  .header {{ display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1e293b; padding-bottom: 16px; margin-bottom: 24px; }}
90
90
  .badge {{ background: #38bdf8; color: #0f172a; font-weight: 700; padding: 4px 10px; border-radius: 999px; font-size: 13px; }}
91
91
  .kpi-row {{ display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }}
@@ -109,7 +109,7 @@ def dashboard(df, filename="kshri_dashboard.html", open_browser=True):
109
109
  <body>
110
110
  <div class="header">
111
111
  <div><h1 style="margin:0;">Kshri EDA Dashboard</h1><small style="color:#94a3b8;">Auto-generated Exploratory Data Analysis</small></div>
112
- <span class="badge">kshri v0.2.1</span>
112
+ <span class="badge">kshri v0.2.3</span>
113
113
  </div>
114
114
  <div class="kpi-row">
115
115
  <div class="kpi"><span>Total Rows</span><h2>{num_rows}</h2></div>
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: kshri
3
+ Version: 0.2.3
4
+ Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
+ Author-email: Rishabh <rishabh@example.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/24f3003274-RISHABH/kshri
8
+ Project-URL: Repository, https://github.com/24f3003274-RISHABH/kshri
9
+ Project-URL: Issues, https://github.com
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Dynamic: license-file
16
+
17
+ # Kshri
18
+
19
+ [![PyPI version](https://fury.io)](https://pypi.org)
20
+ [![License: MIT](https://shields.io)](https://opensource.org)
21
+
22
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
23
+
24
+ ## Installation
25
+ ```bash
26
+ pip install kshri
27
+ ```
28
+
29
+ ## Quickstart: One-Line EDA Dashboard
30
+ ```python
31
+ from kshri import DataFrame, dashboard
32
+
33
+ df = DataFrame({
34
+ "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
35
+ "revenue": [1200000, 2500000, None, 980000]
36
+ })
37
+ dashboard(df)
38
+ ```
39
+
40
+ ## All Features & Functions
41
+
42
+ ### Data & EDA
43
+ * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
44
+ * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
45
+ * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
46
+ * **`roast(df)`**: Scans messy data and gives a brutally honest, funny data-quality report.
47
+ * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
48
+ * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
49
+
50
+ ### Math, Charts, ML & AI
51
+ * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
52
+ * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
53
+ * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
54
+ * **`cosine_similarity(vec1, vec2)`**: Vector similarity scoring for AI embeddings and RAG pipelines.
55
+ * **`to_llm_prompt(df)`**: Converts a DataFrame into a clean Markdown table ready for LLM prompts.
56
+ * **`indian_format(num_or_arr)`**: Formats numbers using the Indian numbering system (Lakhs & Crores).
57
+ * **`explain_like_im_5(arr)`**: Explains averages, medians, and outliers in plain English.
58
+ * **`chaotic_sort(arr)`**: Stress-tests data pipelines with controlled random swaps.
@@ -4,7 +4,7 @@ pyproject.toml
4
4
  src/kshri/__init__.py
5
5
  src/kshri/core.py
6
6
  src/kshri/crazy.py
7
- src/kshri/dashboard.py
7
+ src/kshri/eda.py
8
8
  src/kshri/modern.py
9
9
  src/kshri.egg-info/PKG-INFO
10
10
  src/kshri.egg-info/SOURCES.txt
kshri-0.2.1/PKG-INFO DELETED
@@ -1,94 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kshri
3
- Version: 0.2.1
4
- Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
- Author-email: Rishabh <rishabh@example.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/24f3003274-RISHABH/kshri
8
- Project-URL: Repository, https://github.com/24f3003274-RISHABH/kshri
9
- Project-URL: Issues, https://github.com
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Dynamic: license-file
16
-
17
- # Kshri
18
-
19
- [![PyPI version](https://fury.io)](https://pypi.org)
20
- [![License: MIT](https://shields.io)](https://opensource.org)
21
-
22
- **Kshri** is a lightweight Python array and DataFrame library built with personality, human-readable insights, and Indian number formatting.
23
-
24
- ## Installation
25
- ```bash
26
- pip install kshri
27
- ```
28
-
29
- ## Project Structure
30
- ```text
31
- kshri-project/
32
- ├── pyproject.toml # Build configuration & PyPI metadata
33
- ├── README.md # Main documentation
34
- ├── LICENSE # MIT Open-Source License
35
- └── src/
36
- └── kshri/
37
- ├── __init__.py # Public exports (Array, DataFrame, all functions)
38
- ├── core.py # Core Array and DataFrame classes
39
- └── crazy.py # Data inspection, time_travel, and formatting tools
40
- ```
41
-
42
- ## Functions & Usage
43
-
44
- ### 1. `roast(df)`
45
- Scans a `DataFrame` or dictionary for missing values and tiny datasets, returning a brutally honest summary.
46
- ```python
47
- from kshri import DataFrame, roast
48
-
49
- df = DataFrame({"name": ["Rishabh", "Aman"], "score": [95, None]})
50
- print(roast(df))
51
- ```
52
-
53
- ### 2. `time_travel(df, steps=1)`
54
- Reverts changes (`drop`, column edits) made to a `kshri.DataFrame`.
55
- ```python
56
- from kshri import DataFrame, time_travel
57
-
58
- df = DataFrame({"a":, "b": [3, 4]})
59
- df.drop("b")
60
- time_travel(df) # Restores column "b"
61
- ```
62
-
63
- ### 3. `vibe_check(df)`
64
- Detects mixed data types or numbers accidentally stored as strings inside columns.
65
- ```python
66
- from kshri import DataFrame, vibe_check
67
-
68
- df = DataFrame({"age": ["21", "25"]})
69
- print(vibe_check(df))
70
- ```
71
-
72
- ### 4. `indian_format(num_or_arr)`
73
- Formats numbers or `Array` items using the Indian numbering system (Lakhs and Crores).
74
- ```python
75
- from kshri import indian_format
76
-
77
- print(indian_format(12500000)) # "1,25,00,000"
78
- ```
79
-
80
- ### 5. `explain_like_im_5(arr)`
81
- Summarizes median, mean, range, and extreme outliers in plain English.
82
- ```python
83
- from kshri import Array, explain_like_im_5
84
-
85
- print(explain_like_im_5(Array([10, 12, 11, 500])))
86
- ```
87
-
88
- ### 6. `chaotic_sort(arr, chaos=True, chaos_rate=0.2)`
89
- Sorts an array while optionally swapping a small percentage of elements for stress-testing pipelines.
90
- ```python
91
- from kshri import chaotic_sort
92
-
93
- print(chaotic_sort([5, 1, 4, 2, 3]))
94
- ```
kshri-0.2.1/README.md DELETED
@@ -1,78 +0,0 @@
1
- # Kshri
2
-
3
- [![PyPI version](https://fury.io)](https://pypi.org)
4
- [![License: MIT](https://shields.io)](https://opensource.org)
5
-
6
- **Kshri** is a lightweight Python array and DataFrame library built with personality, human-readable insights, and Indian number formatting.
7
-
8
- ## Installation
9
- ```bash
10
- pip install kshri
11
- ```
12
-
13
- ## Project Structure
14
- ```text
15
- kshri-project/
16
- ├── pyproject.toml # Build configuration & PyPI metadata
17
- ├── README.md # Main documentation
18
- ├── LICENSE # MIT Open-Source License
19
- └── src/
20
- └── kshri/
21
- ├── __init__.py # Public exports (Array, DataFrame, all functions)
22
- ├── core.py # Core Array and DataFrame classes
23
- └── crazy.py # Data inspection, time_travel, and formatting tools
24
- ```
25
-
26
- ## Functions & Usage
27
-
28
- ### 1. `roast(df)`
29
- Scans a `DataFrame` or dictionary for missing values and tiny datasets, returning a brutally honest summary.
30
- ```python
31
- from kshri import DataFrame, roast
32
-
33
- df = DataFrame({"name": ["Rishabh", "Aman"], "score": [95, None]})
34
- print(roast(df))
35
- ```
36
-
37
- ### 2. `time_travel(df, steps=1)`
38
- Reverts changes (`drop`, column edits) made to a `kshri.DataFrame`.
39
- ```python
40
- from kshri import DataFrame, time_travel
41
-
42
- df = DataFrame({"a":, "b": [3, 4]})
43
- df.drop("b")
44
- time_travel(df) # Restores column "b"
45
- ```
46
-
47
- ### 3. `vibe_check(df)`
48
- Detects mixed data types or numbers accidentally stored as strings inside columns.
49
- ```python
50
- from kshri import DataFrame, vibe_check
51
-
52
- df = DataFrame({"age": ["21", "25"]})
53
- print(vibe_check(df))
54
- ```
55
-
56
- ### 4. `indian_format(num_or_arr)`
57
- Formats numbers or `Array` items using the Indian numbering system (Lakhs and Crores).
58
- ```python
59
- from kshri import indian_format
60
-
61
- print(indian_format(12500000)) # "1,25,00,000"
62
- ```
63
-
64
- ### 5. `explain_like_im_5(arr)`
65
- Summarizes median, mean, range, and extreme outliers in plain English.
66
- ```python
67
- from kshri import Array, explain_like_im_5
68
-
69
- print(explain_like_im_5(Array([10, 12, 11, 500])))
70
- ```
71
-
72
- ### 6. `chaotic_sort(arr, chaos=True, chaos_rate=0.2)`
73
- Sorts an array while optionally swapping a small percentage of elements for stress-testing pipelines.
74
- ```python
75
- from kshri import chaotic_sort
76
-
77
- print(chaotic_sort([5, 1, 4, 2, 3]))
78
- ```
@@ -1,94 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kshri
3
- Version: 0.2.1
4
- Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
- Author-email: Rishabh <rishabh@example.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/24f3003274-RISHABH/kshri
8
- Project-URL: Repository, https://github.com/24f3003274-RISHABH/kshri
9
- Project-URL: Issues, https://github.com
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Dynamic: license-file
16
-
17
- # Kshri
18
-
19
- [![PyPI version](https://fury.io)](https://pypi.org)
20
- [![License: MIT](https://shields.io)](https://opensource.org)
21
-
22
- **Kshri** is a lightweight Python array and DataFrame library built with personality, human-readable insights, and Indian number formatting.
23
-
24
- ## Installation
25
- ```bash
26
- pip install kshri
27
- ```
28
-
29
- ## Project Structure
30
- ```text
31
- kshri-project/
32
- ├── pyproject.toml # Build configuration & PyPI metadata
33
- ├── README.md # Main documentation
34
- ├── LICENSE # MIT Open-Source License
35
- └── src/
36
- └── kshri/
37
- ├── __init__.py # Public exports (Array, DataFrame, all functions)
38
- ├── core.py # Core Array and DataFrame classes
39
- └── crazy.py # Data inspection, time_travel, and formatting tools
40
- ```
41
-
42
- ## Functions & Usage
43
-
44
- ### 1. `roast(df)`
45
- Scans a `DataFrame` or dictionary for missing values and tiny datasets, returning a brutally honest summary.
46
- ```python
47
- from kshri import DataFrame, roast
48
-
49
- df = DataFrame({"name": ["Rishabh", "Aman"], "score": [95, None]})
50
- print(roast(df))
51
- ```
52
-
53
- ### 2. `time_travel(df, steps=1)`
54
- Reverts changes (`drop`, column edits) made to a `kshri.DataFrame`.
55
- ```python
56
- from kshri import DataFrame, time_travel
57
-
58
- df = DataFrame({"a":, "b": [3, 4]})
59
- df.drop("b")
60
- time_travel(df) # Restores column "b"
61
- ```
62
-
63
- ### 3. `vibe_check(df)`
64
- Detects mixed data types or numbers accidentally stored as strings inside columns.
65
- ```python
66
- from kshri import DataFrame, vibe_check
67
-
68
- df = DataFrame({"age": ["21", "25"]})
69
- print(vibe_check(df))
70
- ```
71
-
72
- ### 4. `indian_format(num_or_arr)`
73
- Formats numbers or `Array` items using the Indian numbering system (Lakhs and Crores).
74
- ```python
75
- from kshri import indian_format
76
-
77
- print(indian_format(12500000)) # "1,25,00,000"
78
- ```
79
-
80
- ### 5. `explain_like_im_5(arr)`
81
- Summarizes median, mean, range, and extreme outliers in plain English.
82
- ```python
83
- from kshri import Array, explain_like_im_5
84
-
85
- print(explain_like_im_5(Array([10, 12, 11, 500])))
86
- ```
87
-
88
- ### 6. `chaotic_sort(arr, chaos=True, chaos_rate=0.2)`
89
- Sorts an array while optionally swapping a small percentage of elements for stress-testing pipelines.
90
- ```python
91
- from kshri import chaotic_sort
92
-
93
- print(chaotic_sort([5, 1, 4, 2, 3]))
94
- ```
File without changes
File without changes
File without changes
File without changes
File without changes