kshri 0.2.2__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 +58 -0
- kshri-0.2.3/README.md +42 -0
- {kshri-0.2.2 → kshri-0.2.3}/pyproject.toml +1 -1
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri/__init__.py +1 -1
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri/eda.py +2 -2
- kshri-0.2.3/src/kshri.egg-info/PKG-INFO +58 -0
- kshri-0.2.2/PKG-INFO +0 -94
- kshri-0.2.2/README.md +0 -78
- kshri-0.2.2/src/kshri.egg-info/PKG-INFO +0 -94
- {kshri-0.2.2 → kshri-0.2.3}/LICENSE +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/setup.cfg +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri/core.py +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri/crazy.py +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri/modern.py +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri.egg-info/SOURCES.txt +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri.egg-info/dependency_links.txt +0 -0
- {kshri-0.2.2 → kshri-0.2.3}/src/kshri.egg-info/top_level.txt +0 -0
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
|
+
[](https://pypi.org)
|
|
20
|
+
[](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
|
+
[](https://pypi.org)
|
|
4
|
+
[](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.
|
|
@@ -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.
|
|
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
|
+
[](https://pypi.org)
|
|
20
|
+
[](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.2/PKG-INFO
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: kshri
|
|
3
|
-
Version: 0.2.2
|
|
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
|
-
[](https://pypi.org)
|
|
20
|
-
[](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.2/README.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Kshri
|
|
2
|
-
|
|
3
|
-
[](https://pypi.org)
|
|
4
|
-
[](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.2
|
|
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
|
-
[](https://pypi.org)
|
|
20
|
-
[](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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|