Git Product home page Git Product logo

pysus's Introduction

DATASUS library for Python

A library to open DATASUS files (*.dbc) in Python

IMPORTANT: this project is still in an experimental state. Use it at your own risk. Actually, even after it matures, you still will have to use it at your own risk :) (see LICENSE for details)

Usage notes

Since this is a development version you will need to install the package from this repo. Future versions will be published to PyPI as soon as I achieve my goal which is to have a simple function to read DBC files to a Pandas dataframe.

To install it to your system you can use make:

$ make install

Note: this requires setuptools to be installed on your system.

Reading a *.dbc file to a Pandas DataFrame

from datasus import read_dbc
import pandas as pd

df = pd.DataFrame(read_dbc("my-file.dbc"))

Decompressing *.dbc files to *.dbf

You can decompress a *.dbc file from python importing the decompress method:

$ python3
>>> from datasus import decompress
>>> decompress("file.dbc", "file.dbf")
>>>

Or you can run the helper script from the command line:

$ dbc2dbf.py input-file.dbc output-file.dbf

Contact

For support, kudos and complaints drop me an e-mail at [email protected]. Or Twitter @danicat83, at least until Elon burns the place to the ground.

I don't like Python (why???)

If you don't like Python and prefer R instead, see my other project read.dbc.

pysus's People

Contributors

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