All Projects → gtnx → Pandas Highcharts

gtnx / Pandas Highcharts

Licence: mit
Beautiful charting of pandas.DataFrame with Highcharts

Projects that are alternatives of or similar to Pandas Highcharts

Machine Learning By Andrew Ng In Python
Documenting my python implementation of Andrew Ng's Machine Learning course
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Wassdistance
Approximating Wasserstein distances with PyTorch
Stars: ✭ 229 (-1.72%)
Mutual labels:  jupyter-notebook
Mxnet The Straight Dope
An interactive book on deep learning. Much easy, so MXNet. Wow. [Straight Dope is growing up] ---> Much of this content has been incorporated into the new Dive into Deep Learning Book available at https://d2l.ai/.
Stars: ✭ 2,551 (+994.85%)
Mutual labels:  jupyter-notebook
Imaginary Numbers Are Real
Code To Accompany YouTube Series Imaginary Numbers Are Real
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Aotodata
朱小五写文章涉及到的数据分析,爬虫,源数据
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook
Pystacknet
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook
Nlp made easy
Explains nlp building blocks in a simple manner.
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook
Datasets
source{d} datasets ("big code") for source code analysis and machine learning on source code
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Learn Statistical Learning Method
Implementation of Statistical Learning Method, Second Edition.《统计学习方法》第二版,算法实现。
Stars: ✭ 228 (-2.15%)
Mutual labels:  jupyter-notebook
Relevant Search Book
Code and Examples for Relevant Search
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Installations mac ubuntu windows
Installations for Data Science. Anaconda, RStudio, Spark, TensorFlow, AWS (Amazon Web Services).
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Introduction To Python
Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant white space. (This repository contains Python 3 Code)
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook
Mattnet
MAttNet: Modular Attention Network for Referring Expression Comprehension
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook
Dagmm
My attempt at reproducing the paper Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection
Stars: ✭ 231 (-0.86%)
Mutual labels:  jupyter-notebook
Tensorflow 101
TensorFlow Tutorials
Stars: ✭ 2,565 (+1000.86%)
Mutual labels:  jupyter-notebook
Neural Network From Scratch
Ever wondered how to code your Neural Network using NumPy, with no frameworks involved?
Stars: ✭ 230 (-1.29%)
Mutual labels:  jupyter-notebook
Statannot
add statistical annotations (pvalue significance) on an existing boxplot generated by seaborn boxplot
Stars: ✭ 228 (-2.15%)
Mutual labels:  jupyter-notebook
Smt
Surrogate Modeling Toolbox
Stars: ✭ 233 (+0%)
Mutual labels:  jupyter-notebook
Nn
🧑‍🏫 50! Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠
Stars: ✭ 5,720 (+2354.94%)
Mutual labels:  jupyter-notebook
Awesome Pandas
A collection of resources for pandas (Python) and related subjects.
Stars: ✭ 232 (-0.43%)
Mutual labels:  jupyter-notebook

pandas-highcharts

.. image:: https://travis-ci.org/gtnx/pandas-highcharts.svg?branch=master :target: https://travis-ci.org/gtnx/pandas-highcharts .. image:: https://coveralls.io/repos/gtnx/pandas-highcharts/badge.svg :target: https://coveralls.io/r/gtnx/pandas-highcharts

What is it

pandas-highcharts is a Python package which allows you to easily build Highcharts plots_ with pandas.\ DataFrame objects.

Motivation

  • pandas is the best tool to handle data in Python

  • pandas is able to produce matplotlib plots. They work pretty well but have two major drawbacks

    • Not very web friendly
    • Pretty ugly
  • Highcharts produce nice, interactive plot in your browser and is very complete

Features

  • Same interface as DataFrame.plot

  • Following parameters are handled

    • data
    • x
    • y
    • kind
    • figsize
    • use_index
    • title
    • grid
    • legend
    • style
    • logx
    • logy
    • loglog
    • xticks
    • yticks
    • xlim
    • ylim
    • rot
    • fontsize
    • position
    • stacked
    • sort_columns
    • secondary_y
    • mark_right
  • Following parameters are not handled (yet) :

    • ax
    • ay
    • subplots
    • sharex
    • sharey
    • layout
    • colormap
    • colorbar
    • layout
    • table
    • yerr
    • xerr
    • kwds
  • You can specify those specific highcharts parameters:

    • tooltip
  • Static files (highcharts.js) are not embedded

Installation

Install the package using pip

.. code:: shell

pip install pandas-highcharts

Usage

Import it in your views

.. code:: python

import pandas_highcharts
df = ... # create your dataframe here
chart = pandas_highcharts.serialize(df, render_to='my-chart', output_type='json')

In your templates

.. code:: html

<div id="my-chart"></div>
<script type="text/javascript">
  new Highcharts.Chart({{chart|safe}});
</script>

Contributing

See CONTRIBUTING.rst for information on how to contribute to pandas-highcharts.

More examples

Some examples are available on nbviewer_.

Please read the doc for DataFrame.plot_.

For example, with the following dataset:

.. code:: python

import pandas as pd
from pandas_highcharts.core import serialize
from pandas.compat import StringIO
dat = """ts;A;B;C
2015-01-01 00:00:00;27451873;29956800;113
2015-01-01 01:00:00;20259882;17906600;76
2015-01-01 02:00:00;11592256;12311600;48
2015-01-01 03:00:00;11795562;11750100;50
2015-01-01 04:00:00;9396718;10203900;43
2015-01-01 05:00:00;14902826;14341100;53"""
df = pd.read_csv(StringIO(dat), sep=';', index_col='ts', parse_dates='ts')

# Basic line plot
chart = serialize(df, render_to="my-chart", title="My Chart")
# Basic column plot
chart = serialize(df, render_to="my-chart", title="Test", kind="bar")
# Basic column plot
chart = serialize(df, render_to="my-chart", title="Test", kind="barh")
# Plot C on secondary axis
chart = serialize(df, render_to="my-chart", title="Test", secondary_y = ["C"])
# Plot on a 1000x700 div
chart = serialize(df, render_to="my-chart", title="Test", figsize = (1000, 700))

.. _Highcharts plots: http://www.highcharts.com/ .. _pandas: https://github.com/pydata/pandas .. _DataFrame: http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.html .. _DataFrame.plot: http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.plot.html .. _nbviewer: http://nbviewer.ipython.org/github/gtnx/pandas-highcharts/blob/master/example.ipynb

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].