kshri 0.2.3__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kshri
3
- Version: 0.2.3
3
+ Version: 0.3.0
4
4
  Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
5
  Author-email: Rishabh <rishabh@example.com>
6
6
  License-Expression: MIT
@@ -19,27 +19,30 @@ Dynamic: license-file
19
19
  [![PyPI version](https://fury.io)](https://pypi.org)
20
20
  [![License: MIT](https://shields.io)](https://opensource.org)
21
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.
22
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, Built-in Datasets, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
23
23
 
24
24
  ## Installation
25
25
  ```bash
26
26
  pip install kshri
27
27
  ```
28
28
 
29
- ## Quickstart: One-Line EDA Dashboard
29
+ ## Quickstart: Built-In Datasets + One-Line Dashboard
30
30
  ```python
31
- from kshri import DataFrame, dashboard
31
+ from kshri import dashboard
32
+ from kshri.datasets import load_ipl, load_startups
32
33
 
33
- df = DataFrame({
34
- "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
35
- "revenue": [1200000, 2500000, None, 980000]
36
- })
34
+ df = load_ipl()
37
35
  dashboard(df)
38
36
  ```
39
37
 
40
- ## All Features & Functions
38
+ ## All Modules & Functions
41
39
 
42
- ### Data & EDA
40
+ ### 1. Built-In Datasets (`kshri.datasets`)
41
+ * **`load_ipl()`**: Built-in IPL player runs, strike rates, and auction prices.
42
+ * **`load_startups()`**: Built-in Indian tech startups revenue, valuation, and profitability data.
43
+ * **`load_messy()`**: Deliberately messy dataset for testing `roast()`, `vibe_check()`, and `auto_clean()`.
44
+
45
+ ### 2. Data & EDA
43
46
  * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
44
47
  * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
45
48
  * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
@@ -47,7 +50,7 @@ dashboard(df)
47
50
  * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
48
51
  * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
49
52
 
50
- ### Math, Charts, ML & AI
53
+ ### 3. Math, Charts, ML & AI
51
54
  * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
52
55
  * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
53
56
  * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
@@ -3,27 +3,30 @@
3
3
  [![PyPI version](https://fury.io)](https://pypi.org)
4
4
  [![License: MIT](https://shields.io)](https://opensource.org)
5
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.
6
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, Built-in Datasets, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
7
7
 
8
8
  ## Installation
9
9
  ```bash
10
10
  pip install kshri
11
11
  ```
12
12
 
13
- ## Quickstart: One-Line EDA Dashboard
13
+ ## Quickstart: Built-In Datasets + One-Line Dashboard
14
14
  ```python
15
- from kshri import DataFrame, dashboard
15
+ from kshri import dashboard
16
+ from kshri.datasets import load_ipl, load_startups
16
17
 
17
- df = DataFrame({
18
- "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
19
- "revenue": [1200000, 2500000, None, 980000]
20
- })
18
+ df = load_ipl()
21
19
  dashboard(df)
22
20
  ```
23
21
 
24
- ## All Features & Functions
22
+ ## All Modules & Functions
25
23
 
26
- ### Data & EDA
24
+ ### 1. Built-In Datasets (`kshri.datasets`)
25
+ * **`load_ipl()`**: Built-in IPL player runs, strike rates, and auction prices.
26
+ * **`load_startups()`**: Built-in Indian tech startups revenue, valuation, and profitability data.
27
+ * **`load_messy()`**: Deliberately messy dataset for testing `roast()`, `vibe_check()`, and `auto_clean()`.
28
+
29
+ ### 2. Data & EDA
27
30
  * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
28
31
  * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
29
32
  * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
@@ -31,7 +34,7 @@ dashboard(df)
31
34
  * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
32
35
  * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
33
36
 
34
- ### Math, Charts, ML & AI
37
+ ### 3. Math, Charts, ML & AI
35
38
  * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
36
39
  * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
37
40
  * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kshri"
7
- version = "0.2.3"
7
+ version = "0.3.0"
8
8
  authors = [
9
9
  { name="Rishabh", email="rishabh@example.com" },
10
10
  ]
@@ -14,8 +14,9 @@ from .modern import (
14
14
  to_llm_prompt,
15
15
  )
16
16
  from .eda import dashboard
17
+ from . import datasets
17
18
 
18
- __version__ = "0.2.3"
19
+ __version__ = "0.3.0"
19
20
  __all__ = [
20
21
  "Array",
21
22
  "DataFrame",
@@ -30,4 +31,5 @@ __all__ = [
30
31
  "cosine_similarity",
31
32
  "to_llm_prompt",
32
33
  "dashboard",
34
+ "datasets",
33
35
  ]
@@ -0,0 +1,45 @@
1
+ from .core import DataFrame
2
+
3
+ def load_ipl():
4
+ """Load a built-in IPL player & team performance dataset as a kshri.DataFrame."""
5
+ return DataFrame({
6
+ "player": [
7
+ "Virat Kohli", "Rohit Sharma", "MS Dhoni", "Jasprit Bumrah",
8
+ "Hardik Pandya", "Suryakumar Yadav", "KL Rahul", "Rashid Khan",
9
+ "Rishabh Pant", "Shubman Gill"
10
+ ],
11
+ "team": [
12
+ "RCB", "MI", "CSK", "MI",
13
+ "MI", "MI", "LSG", "GT",
14
+ "DC", "GT"
15
+ ],
16
+ "runs":,
17
+ "strike_rate": [148.5, 150.2, 220.5, 95.0, 143.1, 181.4, 136.1, 175.8, 155.4, 157.8],
18
+ "auction_price_cr": [15.0, 16.0, 12.0, 12.0, 15.0, 8.0, 17.0, 15.0, 16.0, 8.0]
19
+ })
20
+
21
+ def load_startups():
22
+ """Load an Indian tech startups valuation & revenue dataset as a kshri.DataFrame."""
23
+ return DataFrame({
24
+ "startup": [
25
+ "Zerodha", "Razorpay", "Zepto", "CRED",
26
+ "Swiggy", "Zomato", "Groww", "PhonePe",
27
+ "Lenskart", "Postman"
28
+ ],
29
+ "city": [
30
+ "Bengaluru", "Bengaluru", "Mumbai", "Bengaluru",
31
+ "Bengaluru", "Gurugram", "Bengaluru", "Bengaluru",
32
+ "Gurugram", "Bengaluru"
33
+ ],
34
+ "revenue_cr":,
35
+ "valuation_cr":,
36
+ "profitable": ["Yes", "Yes", "No", "No", "No", "Yes", "Yes", "No", "Yes", "No"]
37
+ })
38
+
39
+ def load_messy():
40
+ """Load a deliberately messy dataset to test roast(), vibe_check(), and auto_clean()."""
41
+ return DataFrame({
42
+ "name": ["Rishabh", "Aman", "Riya", "Kabir"],
43
+ "age": ["22", "25", None, "29"],
44
+ "salary": [65000, None, 82000, 950000]
45
+ })
@@ -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.3</span>
112
+ <span class="badge">kshri v0.3.0</span>
113
113
  </div>
114
114
  <div class="kpi-row">
115
115
  <div class="kpi"><span>Total Rows</span><h2>{num_rows}</h2></div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kshri
3
- Version: 0.2.3
3
+ Version: 0.3.0
4
4
  Summary: Kshri: A fun, lightweight array and dataframe library with personality.
5
5
  Author-email: Rishabh <rishabh@example.com>
6
6
  License-Expression: MIT
@@ -19,27 +19,30 @@ Dynamic: license-file
19
19
  [![PyPI version](https://fury.io)](https://pypi.org)
20
20
  [![License: MIT](https://shields.io)](https://opensource.org)
21
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.
22
+ **Kshri** is an all-in-one lightweight Python library for **DataFrames, Built-in Datasets, One-Line EDA Dashboards, Machine Learning, AI Embeddings, and Indian Number Formatting**—with zero external dependencies.
23
23
 
24
24
  ## Installation
25
25
  ```bash
26
26
  pip install kshri
27
27
  ```
28
28
 
29
- ## Quickstart: One-Line EDA Dashboard
29
+ ## Quickstart: Built-In Datasets + One-Line Dashboard
30
30
  ```python
31
- from kshri import DataFrame, dashboard
31
+ from kshri import dashboard
32
+ from kshri.datasets import load_ipl, load_startups
32
33
 
33
- df = DataFrame({
34
- "city": ["Delhi", "Mumbai", "Bengaluru", "Pune"],
35
- "revenue": [1200000, 2500000, None, 980000]
36
- })
34
+ df = load_ipl()
37
35
  dashboard(df)
38
36
  ```
39
37
 
40
- ## All Features & Functions
38
+ ## All Modules & Functions
41
39
 
42
- ### Data & EDA
40
+ ### 1. Built-In Datasets (`kshri.datasets`)
41
+ * **`load_ipl()`**: Built-in IPL player runs, strike rates, and auction prices.
42
+ * **`load_startups()`**: Built-in Indian tech startups revenue, valuation, and profitability data.
43
+ * **`load_messy()`**: Deliberately messy dataset for testing `roast()`, `vibe_check()`, and `auto_clean()`.
44
+
45
+ ### 2. Data & EDA
43
46
  * **`DataFrame.read_csv(filepath)`**: Loads CSV files with automatic number parsing.
44
47
  * **`df.auto_clean()`**: Automatically fills missing numbers with the median and missing text with `"Unknown"`.
45
48
  * **`dashboard(df)`**: Generates a dark-mode interactive HTML dashboard (auto-renders inside Google Colab & Jupyter).
@@ -47,7 +50,7 @@ dashboard(df)
47
50
  * **`vibe_check(df)`**: Catches mixed column data types or numbers hiding as strings.
48
51
  * **`time_travel(df, steps=1)`**: Undo button for DataFrames—reverts column drops and edits.
49
52
 
50
- ### Math, Charts, ML & AI
53
+ ### 3. Math, Charts, ML & AI
51
54
  * **`Array` Math**: Supports `+`, `*`, `.sum()`, `.mean()`, and `.std()`.
52
55
  * **`bar_chart(labels, values)`**: Instant terminal and Colab Unicode bar charts.
53
56
  * **`quick_predict(x, y, predict_for)`**: 1-line Linear Regression training and prediction.
@@ -4,6 +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/datasets.py
7
8
  src/kshri/eda.py
8
9
  src/kshri/modern.py
9
10
  src/kshri.egg-info/PKG-INFO
File without changes
File without changes
File without changes
File without changes
File without changes