# DataRoom
DataRoom is a powerful and easy-to-use Python library for data processing, cleaning, analysis, machine learning, and optimization. It provides an intuitive API with well-structured classes and functions, making it simple to work with data in various formats, including CSV, JSON, Excel, databases, and APIs.
## Features
- **Data Ingestion**: Load data from multiple sources, including CSV, JSON, Excel, databases, and APIs.
- **Data Cleaning**: Handle missing values, normalize data, encode categorical variables, and detect outliers.
- **Data Exploration**: Generate descriptive statistics, correlation matrices, and interactive plots.
- **Data Pipelines**: Automate data transformation and preprocessing.
- **Machine Learning Integration**: Train and evaluate classification and regression models.
- **Optimization**: Parallel processing and memory optimization for large datasets.
---
## Installation
You can install DataRoom using pip:
```bash
pip install dataroom
Usage
1. Data Ingestion
Load Data from Different Sources
from dataroom import DataIngestor
ingestor = DataIngestor()
df_csv = ingestor.from_csv("data.csv")
df_json = ingestor.from_json("data.json")
df_excel = ingestor.from_excel("data.xlsx")
df_sql = ingestor.from_sql("sqlite:///database.db", "SELECT * FROM users")
df_api = ingestor.from_api("https://api.example.com/data")
print(df_csv.head())
2. Data Cleaning
Handle Missing Values
from dataroom import DataCleaner
cleaner = DataCleaner()
df_clean = cleaner.handle_missing(df_csv, strategy="mean") # Fill missing values with column mean
print(df_clean.head())
Encode Categorical Data
df_encoded = cleaner.encode(df_clean, encoding_type="onehot")
print(df_encoded.head())
Detect and Remove Outliers
df_no_outliers = cleaner.detect_outliers(df_encoded, method="iqr")
print(df_no_outliers.head())
3. Data Exploration
Generate Summary Statistics
from dataroom import DataExplorer
explorer = DataExplorer()
print(explorer.describe(df_no_outliers))
Plot Data
explorer.plot(df_no_outliers, kind="hist") # Histogram
Generate a Data Profile Report
profile_report = explorer.profile(df_no_outliers)
print(profile_report)
4. Data Pipeline
Automate Data Processing
from dataroom import DataPipeline
pipeline = DataPipeline()
pipeline.add_step(cleaner.normalize, method="minmax")
pipeline.add_step(lambda data: cleaner.handle_missing(data, strategy="median"))
df_pipeline = pipeline.run(df_no_outliers)
print(df_pipeline.head())
5. Machine Learning Integration
Train a Classification Model
from dataroom import DataML
ml_module = DataML()
df_pipeline["target"] = [0, 1, 0, 1, 0, 1]
model, score = ml_module.train_model(df_pipeline, target="target", model_type="classification")
print("Model Accuracy:", score)
Make Predictions
predictions = ml_module.predict(model, df_pipeline.drop(columns=["target"]))
print(predictions)
Auto Feature Selection
selected_features = ml_module.auto_feature_selection(df_pipeline, target="target", method="correlation")
print("Selected Features:", selected_features)
6. Optimization
Parallel Processing
from dataroom import DataOptimizer
optimizer = DataOptimizer()
def process_function(x):
return x * 2
parallel_result = optimizer.parallel_process(process_function, [1, 2, 3, 4, 5])
print(parallel_result)
Optimize Memory Usage
df_optimized = optimizer.optimize_memory(df_pipeline)
print(df_optimized.info())
Coded By Mohammad Taha Gorji
License
This project is licensed under the MIT License.
Metadata
Release files for dataroom 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dataroom-1.0.1.tar.gz | 4.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataroom-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / dataroom-1.0.1.tar.gz
| Download URL | dataroom-1.0.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
513d7fb0d2bddff8ceecb60a5cdda61324a6d099ae0f3c50393f6bd1b4a30e8f
|
|
BLAKE2b-256 checksum How to use checksums |
519304e8bd75731bf0659d69df49ebd08432f31e9a071c6b02218de746e11429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|
Release files / dataroom-1.0.1-py3-none-any.whl
| Download URL | dataroom-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cae656b9d040d3069f246dc746bbfc6ee75f8652c46267671a1a0e0222a1ae3
|
|
BLAKE2b-256 checksum How to use checksums |
863dc4ab1cdf6ec881236f1ac711aef72c318a806dcf0867e1444f1bc905ebcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|
Security for dataroom 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.