Skip to main content

A dead simple interface for manipulating pandas dataframes

Project description

##### UNDER CONSTRUCTION #####

magicpandas

magicpandas makes working with pandas dead simple.

Main Features

  • MagicDataFrame subclasses DataFrame to make existing methods more intuitive as well as add new methods
  • MagicDataFrame adds verbose labels that are used by default when displaying data
  • MagicDataFrame supports Django ORM
    • inspectdf uses DataFrame column types to produce a Django model class (cf. inspectdb)
    • to_django saves the DataFrame to SQL using Django ORM's bulk_update and bulk_create.
Installation

pip install magicpandas

Examples
from magicpandas import MagicDataFrame
mdf = MagicDataFrame(df)
mdf2 = mdf.drop('*e', axis=1) # df2 drops all columns ending in "e"
mdf.browse() # opens the DataFrame in MS Excel with nice formatting
mdf.browse(client='webbrowser') # opens the DataFrame as html displayed in Chrome with nice formatting
mdf.graph()  # Opens a graph in Chrome using the excellent Altair library using sensible encodings
mdf.inspect_for_django()  # prints text that corresponds to a Django model definition

Philosophy

  • Convention over configuration
  • Employs Altair rather than than matplotlib because it's web first and based on the Grammar of Graphics
  • Employs MS Excel for data browsing
  • There should be little gap between intention and implementation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for magicpandas, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size magicpandas-0.0.4-py3-none-any.whl (27.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size magicpandas-0.0.4.tar.gz (22.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page