Giter Site home page Giter Site logo

jbrockmendel / fletcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xhochy/fletcher

0.0 2.0 0.0 184 KB

Pandas ExtensionDType/Array backed by Apache Arrow

Home Page: https://fletcher.readthedocs.io/

License: MIT License

Python 97.74% Shell 2.26%

fletcher's Introduction

fletcher

CircleCI Code style: black FOSSA Status

A library that provides a generic set of Pandas ExtensionDType/Array implementations backed by Apache Arrow. They support a wider range of types than Pandas natively supports and also bring a different set of constraints and behaviours that are beneficial in many situations.

Usage

To use fletcher in Pandas DataFrames, all you need to do is to wrap your data in a FletcherArray object. Your data can be of either pyarrow.Array, pyarrow.ChunkedArray or a type that can be passed to pyarrow.array(โ€ฆ).

import fletcher as fr
import pandas as pd

df = pd.DataFrame({
    'str': fr.FletcherArray(['a', 'b', 'c'])
})

df.info()

# RangeIndex: 3 entries, 0 to 2
# Data columns (total 1 columns):
# str    3 non-null fletcher[string]
# dtypes: fletcher[string](1)
# memory usage: 100.0 bytes

Development

While you can use fletcher in pip-based environments, we strongly recommend using a conda based development setup with packages from conda-forge.

# Create the conda environment with all necessary dependencies
conda create -y -q -n fletcher python=3.6 \
    black=18.5b0 \
    codecov \
    flake8 \
    numba \
    pandas \
    pip \
    pyarrow \
    pytest \
    pytest-cov \
    pytest-flake8 \
    six \
    -c conda-forge

# Activate the newly created environment
source activate fletcher

# Install fletcher into the current environment
pip install -e .

# Run the unit tests (you should do this several times during development)
py.test

Code formatting is done using black. This should keep everything in a consistent styling and the formatting can be automatically adjusted using black .. Note that we have pinned the version of black to ensure that the formatting is reproducible.

License

FOSSA Status

fletcher's People

Contributors

chmp avatar felixhoehleqc avatar fjetter avatar fossabot avatar xhochy avatar

Watchers

 avatar  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.