Git Product home page Git Product logo

data-utils's Introduction

Data Utils

The Data Utils library is a versatile Python toolkit designed to streamline common data-related tasks and enhance the efficiency of your projects. It is intended to be a reusable and easily integratable solution for handling various aspects of data processing, cleaning, and analysis.

Installation

To use the Data Utils library in your projects, follow the steps below:

1. Install Poetry

Make sure you have Poetry installed on your system. You can install Poetry by following the instructions on the official Poetry website.

2. Install Dependencies

Run the following command to install the project dependencies using Poetry:

poetry install

This will create a virtual environment and install the required dependencies specified in the pyproject.toml file.

3. Creating a Build (Optional)

If you want to create a distributable package or build for your Data Utils library, you can use the following Poetry command:

poetry build

Components & Usage

1. DfCounter

DfCounter is a Python class designed to help you analyze and count duplicates in a Pandas DataFrame based on specified columns.

Usage

To use the functionality provided by DfCounter, follow the example below or use the main.py file.:

import pandas as pd
from data_utils.duplication import DfCounter


if __name__ == '__main__':
    test_df = pd.DataFrame(data=[
        ['A', 'a', 'x', 1],
        ['A', 'b', 'x', 1],
        ['A', 'c', 'x', 1],
        ['B', 'a', 'x', 1],
        ['B', 'b', 'x', 1],
        ['B', 'c', 'x', 1],
        ['A', 'a', 'y', 1],
    ],
        columns=['col1', 'col2', 'col3', 'col4']
    )
    test_cols = ['col1']
    counter = DfCounter(test_df, test_cols)

    print(counter.duplicates_stats())

data-utils's People

Contributors

azharsalman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.