Coder Social home page Coder Social logo

utipy's Introduction

utipy

Utility functions for python.

Alpha stage. Subject to change.

https://pypi.python.org/pypi/utipy/

Install from PyPI:

pip install utipy

Install from GitHub:

python -m pip install git+https://github.com/ludvigolsen/utipy

Update this package but not dependencies:

python -m pip install --force-reinstall --no-deps git+https://github.com/ludvigolsen/utipy

Pandas operations

Function Description
makes_up() Is a Series made up of a specific value (more than / less than / equal to a threshold) ?
drop() Drop rows / columns of dataframe based on the percentile appearance of a specified value
polynomializer() Add polynomials to numeric columns, i.e. v1, v1^2, v1^3, ...
resemble() Generate a Series resembling another Series
move_column_inplace() Move a column to a specified index

Data grouping

Function Description
group() Create grouping factors with different methods
partition() Create balanced partitions for train/test
fold() Create balanced folds for cross-validation

Array operations

Function Description
blend() Blend two arrays of same length
windowed_reverse() Reverse array within windows
window() Split array into rolling windows
nan_stats(), print_nan_stats() Get NaN statistics

Time operations

Class Description
StepTimer Time a step of code in a with context
Timestamps Record and keep track of timepoints

Path operations

Class/Function Description
IOPaths Keep track of in-/out paths with checks, directory creation, and a print summary
mk_dir() Create directory if it doesn't exist, with messaging of the created path
rm_dir() Remove directory if it exists, with messaging of the deleted path

String operations

Function Description
letter_strings() Generate n letter strings (aa, ab, ac, ...)

Other utilities

Class/Function Description
Messenger Simplify messaging (print/log) with verbosity and indentation

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.