GithubHelp home page GithubHelp logo

fagan2888 / dataframe_visualiser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ianozsvald/dataframe_visualiser

0.0 0.0 0.0 740 KB

Make simple high-level visualisations of a Pandas dataframe to help when starting new data projects

Python 100.00%

dataframe_visualiser's Introduction

dataframe_visualiser

Make simple high-level visualisations of a Pandas dataframe to help when starting new data projects with Seaborn:

  • Summarise single variables as a grid of plots
  • Summarise each variable and its dependency on a boolean column as a grid of plots
  • Show high-level overview of a subsampled set of cells as a matrix

This is a Python 3 project (and with some tiny edits it would run in Python 2.7).

To run:

>>> # assuming IPython and Python 3.4
>>> import visualise_dataframe
>>> visualise_dataframe.summarise(df)  # draw single-variable plot
>>> visualise_dataframe.summarise(df, dependent_col='some_col_name_in_df')  # draw dependent-variable plot
>>> visualise_dataframe.show_cells(df)  # high-level overview of cells as a matrix

If you run the script then the example will load the Kaggle Titanic competition's train.csv file and will draw a single-variable plot.

Examples

Using the Kaggle Titanic example http://www.kaggle.com/c/titanic-gettingStarted data set we can draw each variable independently:

Single variable

We can also ask it to draw each variable when dependent on a boolean (in the case against Survived):

Dependent variable

Finally with show_cells we can subsample a set of rows and show their dtypes and whether they're NaN or not, to get an idea about the relationship between NaNs and other data:

show_cells

TODO

  • don't subsample df and then analyse, instead analyse before subsampling to count NaNs in full columns
  • add legend to show_cells to identify the colours!
  • consider analysing text cells to show e.g. length of each cell, two tone for binary categories etc for show_cells

dataframe_visualiser's People

Contributors

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