askpandas 0.1.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.
- askpandas-0.1.0/LICENSE +21 -0
- askpandas-0.1.0/MANIFEST.in +8 -0
- askpandas-0.1.0/PKG-INFO +579 -0
- askpandas-0.1.0/README.md +519 -0
- askpandas-0.1.0/askpandas/__init__.py +201 -0
- askpandas-0.1.0/askpandas/core/__init__.py +0 -0
- askpandas-0.1.0/askpandas/core/dataframe.py +226 -0
- askpandas-0.1.0/askpandas/core/engine.py +736 -0
- askpandas-0.1.0/askpandas/core/query_processor.py +217 -0
- askpandas-0.1.0/askpandas/llm/__init__.py +0 -0
- askpandas-0.1.0/askpandas/llm/base.py +13 -0
- askpandas-0.1.0/askpandas/llm/huggingface_client.py +52 -0
- askpandas-0.1.0/askpandas/llm/ollama_client.py +36 -0
- askpandas-0.1.0/askpandas/security/__init__.py +0 -0
- askpandas-0.1.0/askpandas/security/sandbox.py +204 -0
- askpandas-0.1.0/askpandas/utils/__init__.py +0 -0
- askpandas-0.1.0/askpandas/utils/data_quality.py +928 -0
- askpandas-0.1.0/askpandas/utils/helpers.py +95 -0
- askpandas-0.1.0/askpandas/utils/performance.py +613 -0
- askpandas-0.1.0/askpandas/utils/statistical.py +658 -0
- askpandas-0.1.0/askpandas/visualization/__init__.py +0 -0
- askpandas-0.1.0/askpandas/visualization/charts.py +185 -0
- askpandas-0.1.0/askpandas.egg-info/PKG-INFO +579 -0
- askpandas-0.1.0/askpandas.egg-info/SOURCES.txt +35 -0
- askpandas-0.1.0/askpandas.egg-info/dependency_links.txt +1 -0
- askpandas-0.1.0/askpandas.egg-info/not-zip-safe +1 -0
- askpandas-0.1.0/askpandas.egg-info/requires.txt +21 -0
- askpandas-0.1.0/askpandas.egg-info/top_level.txt +2 -0
- askpandas-0.1.0/examples/basic_usage.py +31 -0
- askpandas-0.1.0/examples/multi_dataframe.py +171 -0
- askpandas-0.1.0/fake_sample.csv +21 -0
- askpandas-0.1.0/pyproject.toml +3 -0
- askpandas-0.1.0/requirements.txt +12 -0
- askpandas-0.1.0/setup.cfg +4 -0
- askpandas-0.1.0/setup.py +73 -0
- askpandas-0.1.0/tests/__init__.py +0 -0
- askpandas-0.1.0/tests/test_dataframe.py +333 -0
askpandas-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Md Irfan Ali
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
askpandas-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: askpandas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AI-powered data engineering and analytics assistant for querying CSV data using natural languageβlocally and intelligently
|
|
5
|
+
Home-page: https://github.com/irfanalidv/AskPandas
|
|
6
|
+
Author: Md Irfan Ali
|
|
7
|
+
Author-email: irfanali29@hotmail.com
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/irfanalidv/AskPandas/issues
|
|
9
|
+
Project-URL: Source, https://github.com/irfanalidv/AskPandas
|
|
10
|
+
Project-URL: Documentation, https://github.com/irfanalidv/AskPandas#readme
|
|
11
|
+
Keywords: data-analysis,pandas,ai,natural-language,csv,data-science,machine-learning,llm,ollama,huggingface
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: pandas>=1.5.0
|
|
29
|
+
Requires-Dist: numpy>=1.23.0
|
|
30
|
+
Requires-Dist: matplotlib>=3.5.0
|
|
31
|
+
Requires-Dist: seaborn>=0.12.0
|
|
32
|
+
Requires-Dist: requests>=2.28.0
|
|
33
|
+
Requires-Dist: transformers>=4.30.0
|
|
34
|
+
Requires-Dist: torch>=2.0.0
|
|
35
|
+
Requires-Dist: faker>=18.0.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
42
|
+
Provides-Extra: full
|
|
43
|
+
Requires-Dist: jupyter>=1.0.0; extra == "full"
|
|
44
|
+
Requires-Dist: ipywidgets>=8.0.0; extra == "full"
|
|
45
|
+
Requires-Dist: plotly>=5.0.0; extra == "full"
|
|
46
|
+
Requires-Dist: bokeh>=3.0.0; extra == "full"
|
|
47
|
+
Dynamic: author
|
|
48
|
+
Dynamic: author-email
|
|
49
|
+
Dynamic: classifier
|
|
50
|
+
Dynamic: description
|
|
51
|
+
Dynamic: description-content-type
|
|
52
|
+
Dynamic: home-page
|
|
53
|
+
Dynamic: keywords
|
|
54
|
+
Dynamic: license-file
|
|
55
|
+
Dynamic: project-url
|
|
56
|
+
Dynamic: provides-extra
|
|
57
|
+
Dynamic: requires-dist
|
|
58
|
+
Dynamic: requires-python
|
|
59
|
+
Dynamic: summary
|
|
60
|
+
|
|
61
|
+
# AskPandas: AI-Powered Data Engineering & Analytics Assistant
|
|
62
|
+
|
|
63
|
+
[](https://www.python.org/downloads/)
|
|
64
|
+
[](https://opensource.org/licenses/MIT)
|
|
65
|
+
[](https://badge.fury.io/py/askpandas)
|
|
66
|
+
|
|
67
|
+
AskPandas is an open-source Python library that lets you query and transform CSV data using natural language, powered by free, local open-source LLMs via Ollama. **No API keys, no cloud, no cost.**
|
|
68
|
+
|
|
69
|
+
## π **Quick Start (5 minutes!)**
|
|
70
|
+
|
|
71
|
+
### 1. **Install AskPandas**
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install askpandas
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. **Install Ollama (one command)**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# macOS/Linux
|
|
81
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
|
82
|
+
|
|
83
|
+
# Windows: Download from https://ollama.com/download
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3. **Pull a lightweight model**
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
ollama pull phi3:mini # Very small, very fast
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 4. **Start Ollama**
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ollama serve
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 5. **Start analyzing data!**
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
import askpandas as ap
|
|
102
|
+
|
|
103
|
+
# Set up AI
|
|
104
|
+
llm = ap.OllamaLLM(model_name="phi3:mini")
|
|
105
|
+
ap.set_llm(llm)
|
|
106
|
+
|
|
107
|
+
# Load your data
|
|
108
|
+
df = ap.DataFrame("your_data.csv")
|
|
109
|
+
|
|
110
|
+
# Ask questions in plain English!
|
|
111
|
+
result = df.chat("What is the total revenue?")
|
|
112
|
+
print(result)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### π **See It In Action!**
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import askpandas as ap
|
|
119
|
+
import pandas as pd
|
|
120
|
+
|
|
121
|
+
# Create sample data
|
|
122
|
+
data = {
|
|
123
|
+
'product': ['Apple', 'Banana', 'Orange'],
|
|
124
|
+
'price': [2.50, 1.00, 1.50],
|
|
125
|
+
'quantity': [100, 200, 150]
|
|
126
|
+
}
|
|
127
|
+
df = pd.DataFrame(data)
|
|
128
|
+
df['revenue'] = df['price'] * df['quantity']
|
|
129
|
+
|
|
130
|
+
# Create AskPandas DataFrame
|
|
131
|
+
sales_df = ap.DataFrame(df)
|
|
132
|
+
|
|
133
|
+
# AI-powered analysis
|
|
134
|
+
result = sales_df.chat("What is the total revenue?")
|
|
135
|
+
# Output: Total Revenue: $675.00
|
|
136
|
+
|
|
137
|
+
# More complex queries
|
|
138
|
+
result = sales_df.chat("Show me the top 3 products by revenue")
|
|
139
|
+
# Output: Product analysis with rankings
|
|
140
|
+
|
|
141
|
+
result = sales_df.chat("Calculate average price by product")
|
|
142
|
+
# Output: Average Price: $1.67
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## π― **What Can You Do? (Everything!)**
|
|
146
|
+
|
|
147
|
+
### π **Data Analysis - Just Ask!**
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
# Basic questions
|
|
151
|
+
df.chat("What is the average price?")
|
|
152
|
+
# Output: Average Price: $1.67
|
|
153
|
+
|
|
154
|
+
df.chat("Show me the top 5 customers by revenue")
|
|
155
|
+
# Output: Customer rankings with revenue amounts
|
|
156
|
+
|
|
157
|
+
df.chat("How many sales were made in each region?")
|
|
158
|
+
# Output: Regional sales breakdown
|
|
159
|
+
|
|
160
|
+
# Complex analysis
|
|
161
|
+
df.chat("""
|
|
162
|
+
Analyze our sales performance:
|
|
163
|
+
1. Calculate total revenue by month
|
|
164
|
+
2. Show the trend over time
|
|
165
|
+
3. Identify the best performing products
|
|
166
|
+
4. Create a visualization
|
|
167
|
+
""")
|
|
168
|
+
# Output: Comprehensive analysis with insights
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### π¨ **Beautiful Visualizations - Automatically!**
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
# Charts are created automatically
|
|
175
|
+
df.chat("Create a bar chart of sales by region")
|
|
176
|
+
df.chat("Plot revenue trends over time")
|
|
177
|
+
df.chat("Show correlation between price and quantity")
|
|
178
|
+
df.chat("Display distribution of customer ages")
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### π **Data Quality & Cleaning**
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
# Automatic data assessment
|
|
185
|
+
df.chat("Check for missing values and duplicates")
|
|
186
|
+
df.chat("Identify outliers in numeric columns")
|
|
187
|
+
df.chat("Clean column names and standardize formats")
|
|
188
|
+
df.chat("Validate data types and suggest improvements")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### π **Multi-Dataset Analysis**
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
# Work with multiple files
|
|
195
|
+
customers = ap.DataFrame("customers.csv")
|
|
196
|
+
orders = ap.DataFrame("orders.csv")
|
|
197
|
+
products = ap.DataFrame("products.csv")
|
|
198
|
+
|
|
199
|
+
# Cross-dataset insights
|
|
200
|
+
ap.chat("""
|
|
201
|
+
Customer analysis:
|
|
202
|
+
1. Join customers with their orders
|
|
203
|
+
2. Calculate lifetime value by segment
|
|
204
|
+
3. Show purchase patterns
|
|
205
|
+
4. Identify high-value customers
|
|
206
|
+
""", customers, orders, products)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## π‘ **Real-World Examples**
|
|
210
|
+
|
|
211
|
+
### π **Sales Analysis**
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
import askpandas as ap
|
|
215
|
+
|
|
216
|
+
# Load sales data
|
|
217
|
+
sales = ap.DataFrame("sales_data.csv")
|
|
218
|
+
|
|
219
|
+
# Comprehensive sales report
|
|
220
|
+
sales.chat("What is our total revenue?")
|
|
221
|
+
# Output: Total Revenue: $78,586.11
|
|
222
|
+
|
|
223
|
+
sales.chat("Show me the top 3 products by revenue")
|
|
224
|
+
# Output: Product rankings with revenue amounts
|
|
225
|
+
|
|
226
|
+
sales.chat("Calculate average order value by region")
|
|
227
|
+
# Output: Regional performance metrics
|
|
228
|
+
|
|
229
|
+
sales.chat("How many sales were made in each region?")
|
|
230
|
+
# Output: Regional sales breakdown
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### π₯ **Customer Analytics**
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
# Customer behavior analysis
|
|
237
|
+
customers = ap.DataFrame("customers.csv")
|
|
238
|
+
transactions = ap.DataFrame("transactions.csv")
|
|
239
|
+
|
|
240
|
+
ap.chat("""
|
|
241
|
+
Customer behavior insights:
|
|
242
|
+
1. Customer lifetime value analysis
|
|
243
|
+
2. Purchase frequency patterns
|
|
244
|
+
3. Churn prediction factors
|
|
245
|
+
4. Customer satisfaction metrics
|
|
246
|
+
5. Personalized marketing recommendations
|
|
247
|
+
""", customers, transactions)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### π **Financial Analysis**
|
|
251
|
+
|
|
252
|
+
```python
|
|
253
|
+
# Financial data processing
|
|
254
|
+
financial = ap.DataFrame("financial_data.csv")
|
|
255
|
+
|
|
256
|
+
financial.chat("""
|
|
257
|
+
Financial performance review:
|
|
258
|
+
1. Profit and loss analysis
|
|
259
|
+
2. Cash flow trends
|
|
260
|
+
3. Expense categorization
|
|
261
|
+
4. Budget vs actual comparison
|
|
262
|
+
5. Financial ratios and KPIs
|
|
263
|
+
6. Risk assessment and recommendations
|
|
264
|
+
""")
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### π¬ **Research & Academic**
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
# Research data analysis
|
|
271
|
+
research = ap.DataFrame("research_data.csv")
|
|
272
|
+
|
|
273
|
+
research.chat("""
|
|
274
|
+
Statistical analysis:
|
|
275
|
+
1. Descriptive statistics for all variables
|
|
276
|
+
2. Correlation analysis between key factors
|
|
277
|
+
3. Hypothesis testing results
|
|
278
|
+
4. Outlier detection and treatment
|
|
279
|
+
5. Data distribution visualizations
|
|
280
|
+
6. Statistical significance testing
|
|
281
|
+
""")
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## π οΈ **Advanced Features**
|
|
285
|
+
|
|
286
|
+
### π§ **Custom Configuration**
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
import askpandas as ap
|
|
290
|
+
|
|
291
|
+
# Set your preferences
|
|
292
|
+
ap.set_config(
|
|
293
|
+
verbose=True, # See what's happening
|
|
294
|
+
plot_style="seaborn", # Beautiful charts
|
|
295
|
+
output_dir="my_analysis", # Save results here
|
|
296
|
+
max_execution_time=120, # Allow longer analysis
|
|
297
|
+
enable_history=True # Track all queries
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### π¨ **Custom Visualizations**
|
|
302
|
+
|
|
303
|
+
```python
|
|
304
|
+
# Create custom charts
|
|
305
|
+
from askpandas.visualization.charts import create_bar_chart, save_plot
|
|
306
|
+
|
|
307
|
+
# Custom bar chart
|
|
308
|
+
fig = create_bar_chart(
|
|
309
|
+
df.df,
|
|
310
|
+
x_col="category",
|
|
311
|
+
y_col="value",
|
|
312
|
+
title="My Custom Chart",
|
|
313
|
+
figsize=(12, 8)
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
# Save with high quality
|
|
317
|
+
save_plot(fig, "custom_chart.png", dpi=300)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### π **Query Intelligence**
|
|
321
|
+
|
|
322
|
+
```python
|
|
323
|
+
# Get help with your queries
|
|
324
|
+
query = "Show me sales trends"
|
|
325
|
+
analysis = ap.analyze_query(query)
|
|
326
|
+
print(f"Query type: {analysis['primary_category']}")
|
|
327
|
+
|
|
328
|
+
# Get suggestions
|
|
329
|
+
suggestions = ap.get_query_examples('visualization')
|
|
330
|
+
print("Try these:", suggestions[:3])
|
|
331
|
+
|
|
332
|
+
# Validate your query
|
|
333
|
+
validation = ap.validate_query(query, df.columns)
|
|
334
|
+
if validation['is_valid']:
|
|
335
|
+
print("β
Query is valid!")
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
## π **Performance Tips for Best Results**
|
|
339
|
+
|
|
340
|
+
### πͺ **Optimize Your Queries**
|
|
341
|
+
|
|
342
|
+
```python
|
|
343
|
+
# β
Good - Specific and clear
|
|
344
|
+
df.chat("Calculate total revenue by month for 2024, excluding returns")
|
|
345
|
+
|
|
346
|
+
# β Avoid - Too vague
|
|
347
|
+
df.chat("Analyze this data")
|
|
348
|
+
|
|
349
|
+
# β
Good - Step-by-step analysis
|
|
350
|
+
df.chat("""
|
|
351
|
+
1. Filter data for Q4 2024
|
|
352
|
+
2. Group by product category
|
|
353
|
+
3. Calculate sum of revenue
|
|
354
|
+
4. Sort by revenue descending
|
|
355
|
+
5. Show top 10 results
|
|
356
|
+
""")
|
|
357
|
+
|
|
358
|
+
# β
Good - Include context
|
|
359
|
+
df.chat("Show customer retention rate, considering customers who made purchases in both 2023 and 2024")
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### π― **Choose the Right Model**
|
|
363
|
+
|
|
364
|
+
```python
|
|
365
|
+
# For speed and basic analysis
|
|
366
|
+
llm = ap.OllamaLLM(model_name="phi3:mini") # Fastest
|
|
367
|
+
|
|
368
|
+
# For better quality and complex queries
|
|
369
|
+
llm = ap.OllamaLLM(model_name="mistral:7b") # Balanced
|
|
370
|
+
|
|
371
|
+
# For best results (slower)
|
|
372
|
+
llm = ap.OllamaLLM(model_name="llama3.2:13b") # Highest quality
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### π **Data Preparation Tips**
|
|
376
|
+
|
|
377
|
+
```python
|
|
378
|
+
# Clean your data first
|
|
379
|
+
df = ap.DataFrame("messy_data.csv")
|
|
380
|
+
|
|
381
|
+
# Ask AskPandas to help clean it
|
|
382
|
+
df.chat("""
|
|
383
|
+
Help me clean this data:
|
|
384
|
+
1. Identify and handle missing values
|
|
385
|
+
2. Remove duplicates
|
|
386
|
+
3. Fix data type issues
|
|
387
|
+
4. Standardize column names
|
|
388
|
+
5. Show me what was cleaned
|
|
389
|
+
""")
|
|
390
|
+
|
|
391
|
+
# Then analyze the clean data
|
|
392
|
+
df.chat("Now analyze the cleaned data for insights")
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## π§ **Installation Options**
|
|
396
|
+
|
|
397
|
+
### **Basic Installation**
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
pip install askpandas
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### **Full Installation (Recommended)**
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
pip install "askpandas[full]"
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### **Development Installation**
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
git clone https://github.com/irfanalidv/AskPandas
|
|
413
|
+
cd AskPandas
|
|
414
|
+
pip install -e ".[dev]"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
## π± **Platform Support**
|
|
418
|
+
|
|
419
|
+
- β
**macOS** - Native support with Apple Silicon optimization
|
|
420
|
+
- β
**Linux** - Full compatibility with all distributions
|
|
421
|
+
- β
**Windows** - Complete support with WSL2 recommended
|
|
422
|
+
- β
**Cloud** - Works on Google Colab, AWS, Azure, etc.
|
|
423
|
+
|
|
424
|
+
## π **Troubleshooting**
|
|
425
|
+
|
|
426
|
+
### **Common Issues & Solutions**
|
|
427
|
+
|
|
428
|
+
**"No LLM configured" error?**
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# Make sure Ollama is running
|
|
432
|
+
ollama serve
|
|
433
|
+
|
|
434
|
+
# Check if model is downloaded
|
|
435
|
+
ollama list
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Slow responses?**
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
# Try a smaller model
|
|
442
|
+
ollama pull phi3:mini
|
|
443
|
+
|
|
444
|
+
# Close other applications to free memory
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**Installation issues?**
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Update pip
|
|
451
|
+
pip install --upgrade pip
|
|
452
|
+
|
|
453
|
+
# Install with specific Python version
|
|
454
|
+
python3.9 -m pip install askpandas
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## π **Learning Resources**
|
|
458
|
+
|
|
459
|
+
### **Interactive Examples**
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
# Run the interactive demo
|
|
463
|
+
python simple_demo.py
|
|
464
|
+
|
|
465
|
+
# Try the configuration setup
|
|
466
|
+
python simple_config.py
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### **Sample Datasets**
|
|
470
|
+
|
|
471
|
+
- `fake_sample.csv` - Small sample for testing
|
|
472
|
+
- `comprehensive_sample.csv` - Larger dataset for practice
|
|
473
|
+
- Create your own CSV files and start analyzing!
|
|
474
|
+
|
|
475
|
+
## π **Success Stories**
|
|
476
|
+
|
|
477
|
+
### **Data Scientists**
|
|
478
|
+
|
|
479
|
+
> "AskPandas reduced my data exploration time from hours to minutes. I can now focus on insights instead of coding."
|
|
480
|
+
|
|
481
|
+
### **Business Analysts**
|
|
482
|
+
|
|
483
|
+
> "I can analyze complex datasets without learning Python syntax. Natural language queries are a game-changer!"
|
|
484
|
+
|
|
485
|
+
### **Researchers**
|
|
486
|
+
|
|
487
|
+
> "Perfect for exploratory data analysis. I can quickly test hypotheses and generate visualizations for papers."
|
|
488
|
+
|
|
489
|
+
### **Students**
|
|
490
|
+
|
|
491
|
+
> "Learning data analysis has never been easier. AskPandas makes complex concepts accessible."
|
|
492
|
+
|
|
493
|
+
## π **What's Next?**
|
|
494
|
+
|
|
495
|
+
### **Version 0.2.0 (Coming Soon)**
|
|
496
|
+
|
|
497
|
+
- [ ] Jupyter notebook integration
|
|
498
|
+
- [ ] More visualization options (Plotly, Bokeh)
|
|
499
|
+
- [ ] SQL query generation
|
|
500
|
+
- [ ] Data pipeline automation
|
|
501
|
+
|
|
502
|
+
### **Version 1.0.0 (Future)**
|
|
503
|
+
|
|
504
|
+
- [ ] Enterprise features
|
|
505
|
+
- [ ] Advanced ML integration
|
|
506
|
+
- [ ] Real-time data streaming
|
|
507
|
+
- [ ] Community plugins
|
|
508
|
+
|
|
509
|
+
## π€ **Get Help & Contribute**
|
|
510
|
+
|
|
511
|
+
- **π Documentation**: [GitHub Wiki](https://github.com/irfanalidv/AskPandas/wiki)
|
|
512
|
+
- **π Bug Reports**: [GitHub Issues](https://github.com/irfanalidv/AskPandas/issues)
|
|
513
|
+
- **π¬ Discussions**: [GitHub Discussions](https://github.com/irfanalidv/AskPandas/discussions)
|
|
514
|
+
- **β Star**: [GitHub Repository](https://github.com/irfanalidv/AskPandas)
|
|
515
|
+
|
|
516
|
+
## π **License**
|
|
517
|
+
|
|
518
|
+
MIT License - Use freely for personal and commercial projects!
|
|
519
|
+
|
|
520
|
+
## π **Acknowledgments**
|
|
521
|
+
|
|
522
|
+
- **Ollama Team** - Making local AI accessible
|
|
523
|
+
- **HuggingFace** - Open-source AI models
|
|
524
|
+
- **Pandas Community** - Amazing data tools
|
|
525
|
+
- **Open Source Contributors** - Building the future together
|
|
526
|
+
|
|
527
|
+
## π― **Complete Working Demonstration**
|
|
528
|
+
|
|
529
|
+
Want to see everything in action? Run our comprehensive demo:
|
|
530
|
+
|
|
531
|
+
```bash
|
|
532
|
+
# Clone the repository
|
|
533
|
+
git clone https://github.com/irfanalidv/AskPandas.git
|
|
534
|
+
cd AskPandas
|
|
535
|
+
|
|
536
|
+
# Run the complete demonstration
|
|
537
|
+
python final_working_demo.py
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
This demo showcases:
|
|
541
|
+
|
|
542
|
+
- β
**DataFrame Creation & Analysis** - Real data processing
|
|
543
|
+
- β
**Data Quality & Cleaning** - Automatic column standardization
|
|
544
|
+
- β
**AI-Powered Queries** - Natural language analysis
|
|
545
|
+
- β
**Multi-Dataset Analysis** - Joining and complex queries
|
|
546
|
+
- β
**Configuration Management** - Customizable settings
|
|
547
|
+
- β
**Query Intelligence** - Automatic query categorization
|
|
548
|
+
|
|
549
|
+
### **π Quick Test**
|
|
550
|
+
|
|
551
|
+
```python
|
|
552
|
+
import askpandas as ap
|
|
553
|
+
import pandas as pd
|
|
554
|
+
|
|
555
|
+
# Create test data
|
|
556
|
+
data = {'name': ['Alice', 'Bob'], 'age': [25, 30], 'salary': [50000, 60000]}
|
|
557
|
+
df = pd.DataFrame(data)
|
|
558
|
+
ap_df = ap.DataFrame(df)
|
|
559
|
+
|
|
560
|
+
# Test basic methods
|
|
561
|
+
print(f"Shape: {ap_df.shape()}") # Output: Shape: (2, 3)
|
|
562
|
+
print(f"Columns: {ap_df.columns()}") # Output: Columns: ['name', 'age', 'salary']
|
|
563
|
+
|
|
564
|
+
# Get comprehensive info
|
|
565
|
+
print(ap_df.info()) # Output: Detailed DataFrame information
|
|
566
|
+
|
|
567
|
+
# Statistical description
|
|
568
|
+
print(ap_df.describe()) # Output: Statistical summary
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
**π Ready to transform your data analysis? Install AskPandas today!**
|
|
574
|
+
|
|
575
|
+
```bash
|
|
576
|
+
pip install askpandas
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
**Made with β€οΈ by Md Irfan Ali**
|