Comments (6)
Hi shivaram
Thanks for contributing. Could you make a pull request?
Thanks
from pandas-highcharts.
I have emailed you
the modified core.py and a sample usage python program.
from pandas-highcharts.
Hi Guillaume Thomas,
Attached is the updated core,py
Work with Python 3Made APIs more generic cab called by pandas or non-panda by passing X_LIST and Y_LIST to be plotted as two separate list.Added support for 'pie' plot.
A sample usage / help program :===================================================================#!/usr/local/bin/python3.4
Note : This Example is run through "ipython nootebook", need to run "ipython nootebook"# using the Python 3 version installed in your machine.
import pandas as pdfrom urllib.request import urlopenfrom IPython.display import display, display_pretty, Javascript, HTMLfrom py_hicharts import serialize
df = pd.read_csv( urlopen('http://www.quandl.com/api/v1/datasets/ODA/DEU_PCPIPCH.csv?column=1'))
df["Date"] = df["Date"].apply(lambda x: int(x[:4]))df = df.sort("Date")#print(df) ; print ('\n')
x_list = df['Date'].tolist() # If this does not work try df['Date'].get_values().tolist() inp_list = df['Value'].tolist()output_json_dict = {}
output_json_dict = serialize(inp_list, "germany rate", output_json_dict, title="Germany inflation rate", x_title="collection year", x_categories=x_list, y_title="Inflation rate", render_to="chart1")
This is to show that you can add different y-serieschart = serialize(inp_list, "new germany rate", output_json_dict, "add_series", "get_new_hichart")
display(HTML("""
<script type="text/javascript">%(chart)s</script>""" % locals()))pie chart examplepie_name_list = ["Firefox", "IE", "Chrome", "Saafari", "Opera", "Others"]pie_value_list = [45, 26.8, 12.8, 8.5, 6.2, 0.7]
output_json_dict={} chart = serialize(pie_value_list, "Browsershare", output_json_dict, "get_new_hichart", title="Browsershare", x_title="Browser names", x_categories=pie_name_list, y_title="browser use percentage", kind="pie",render_to="chart5")
display(HTML(""" <script type="text/javascript">%(chart)s</script>""" % locals()))
Date: Wed, 4 Mar 2015 15:33:14 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [pandas-highcharts] Upgrading to Python 3 and adding support for pie chart (#11)
Hi shivaram
Thanks for contributing. Could you make a pull request?
Thanks
—
Reply to this email directly or view it on GitHub.
from pandas-highcharts.
Hi Guillaume.
I am not familiar with pull request, let me know what I need to do.
I have given you all changes I did.
from pandas-highcharts.
Please read this about pull requests.
I added support for py3.4. If it's ok for you, could you close the issue?
from pandas-highcharts.
I added support for pie chart. I close the issue
from pandas-highcharts.
Related Issues (20)
- Export/Print Chart Option not showing up HOT 1
- pandas_highcharts.serialize raises AttributeError: 'module' object has no attribute 'serialize' HOT 1
- Sample dataframe HOT 3
- Minor fix to sample notebook for Python 2 and 3 compatibility HOT 1
- Does not support multiple series kinds on same chart - e.g. bar and line HOT 1
- display_charts() for two different style and secondary_y
- failing to import display_charts from python (v2.7.10), working fine with %load from IPython HOT 2
- Does not support dict title
- Column Drilldown
- May I ask how can I plot live data through this?
- How to add ohlc data types?
- How to set the figure size of the highcharts?
- How do I download a notebook as HTML?
- Adding PlotLines with JavaScript after Render HOT 1
- No support for sharex and sharey params HOT 1
- plotOptions -> Series -> compare and plotOptions -> Series -> compareBase not supported
- TypeError:Only booleans, lists, and dictionaries are accepted for the 'parse_dates' parameter
- Jupyterlab doesn't render figures
- Probably should list out chart types that are supported on README HOT 1
- Is this library active?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas-highcharts.