Metadata-Version: 2.1
Name: patatas
Version: 0.1.1
Summary: A powerful package for K-NN regression, data preprocessing, and analysis for Data Science
Home-page: https://github.com/PatataTeam/patata-poderosa
Author: Patata Team
Author-email: demstalfer@gmail.com
License: UNKNOWN
Keywords: data preprocessing knn regression analysis data science scikit-learn pandas
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown

# Patatas 

[https://pypi.org/project/patatas/](https://pypi.org/project/patatas/)


Patatas is a Python package that provides tools for preprocessing and modeling data using machine learning algorithms.

## Installation

You can install Patatas using pip:

pip install patatas


## Installation

### Usage
Encoding categorical columns
To encode all categorical (object) columns of a pandas DataFrame using Label Encoding, you can use the fritas() function:
```bash

from patatas import fritas
import pandas as pd

# Create a sample DataFrame with categorical columns
df = pd.DataFrame({'Color': ['Red', 'Green', 'Blue'], 'Size': ['Small', 'Medium', 'Large']})

# Encode categorical columns using Label Encoding
df_encoded = fritas(df)

# Show the encoded DataFrame
print(df_encoded)
```


Finding the best value of k for K-NN regression
To find the best value of k (number of neighbors) for K-NN regression based on the mean squared error, you can use the bravas() function:


```bash
from patatas import bravas
import pandas as pd

# Load a sample dataset
df = pd.read_csv('my_dataset.csv')

# Find the best value of k for K-NN regression
best_k = bravas(df, 'target_column')
print(f'The best value of k is {best_k}')
Contributing
Contributions to Patata Poderosa are welcome! To contribute, please follow these steps:
```

Fork the repository and create a new branch for your feature or bug fix.
Write tests for your changes.
Implement your feature or bug fix.
Run the tests and ensure they pass.
Submit a pull request.
License
Patatas is released under the MIT License. See the LICENSE file for more details.



