Skip to content

Commit ccdc6da

Browse files
authored
Merge pull request python-sprints#152 from Cheukting/sprint-20190626
Adding pandas viz sprint vol 2
2 parents 56946a5 + adb7a1f commit ccdc6da

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

_posts/2019-06-26-pandas-viz2.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
category: "london"
3+
title: "pandas visualisation vol.2"
4+
level: "All"
5+
time: "18:30"
6+
rsvp_link: https://www.meetup.com/Python-Sprints/events/262426168/
7+
project:
8+
sponsor: ecom
9+
---
10+
11+
Let's continue working on visualisation in `pandas`.
12+
13+
Plotting in `pandas` is very easy, mainly by using `Series.plot()` and `DataFrame.plot()` methods.
14+
There is a plotting subsystem in `pandas` based in `matplotlib` that implement different types of
15+
plots (e.g. lines, bars, boxplots, kde...).
16+
17+
In the last months, several new projects have been create to address new use cases for visualising
18+
in `pandas`. For example, to generate interactive plots. Some of these projects are:
19+
20+
- https://hvplot.pyviz.org
21+
- https://github.com/PatrikHlobil/Pandas-Bokeh
22+
- https://github.com/altair-viz/pdvega/
23+
24+
Those libraries have been monkey patching `pandas` to be able to plot easily, so plotting can be
25+
done by using `DataFrame.hvplot()`, `DataFrame.plot_bokeh()`...
26+
27+
But a better design would be to decouple the existing plotting code in pandas into an extension
28+
registered with the `pandas` extension capabilities, and be able to select with an option with
29+
plotting backend the user wants to use. The resulting code would be:
30+
31+
```python
32+
pandas.set_option('plotting.backend', 'hvplot')
33+
df.plot()
34+
```
35+
36+
With this architecture, there are several advantages:
37+
38+
- Developing new plotting backends for pandas becomes much simpler
39+
- Plotting backends share a common API
40+
- Users of pandas don't need to learn a new syntax for each plugin
41+
- Migrating existing code becomes trivial, by just adding a single line of code setting the option for the backend
42+
- Internal pandas code becomes cleaner, with the plotting code fully decoupled from the rest
43+
44+
Work on this is already going on, with a first PR that decoupled the current plotting code:
45+
46+
https://github.com/pandas-dev/pandas/pull/26414
47+
48+
In this sprint we will continue the work, by working on different tasks:
49+
- Adding the option to select the backend
50+
- Defining and documenting the pandas plotting API
51+
- Porting existing libraries to the new plotting API
52+
- Document current pandas functionality
53+
54+
We also can work on other pandas issues, for example:
55+
- pytest-azurepipelines: <https://github.com/pandas-dev/pandas/issues/26601>
56+
- Documentation warnings: <https://github.com/pandas-dev/pandas/issues/24173> / <https://github.com/pandas-dev/pandas/issues/24661>
57+
- PandasArray in API docs: <https://github.com/pandas-dev/pandas/issues/24507>
58+
- pyarrow failure: <https://github.com/pandas-dev/pandas/issues/26656>
59+
- Organise dependencies: <https://github.com/pandas-dev/pandas/issues/26659>
60+
- Remove isort dependency: <https://github.com/pandas-dev/pandas/issues/26661>
61+
- Feel free to propose yours
62+
63+
As usual, we will give priority to join the sprint to the next people:
64+
65+
- Experienced open source contributors
66+
- People from underrepresented minorities in our sprints
67+
68+
Agenda
69+
------
70+
71+
- 6:30pm: Food and networking
72+
- 6:45pm: Presentation of the project and the sponsor
73+
- 7:00pm: Coding
74+
75+
76+
The day of the sprint
77+
---------------------
78+
79+
- Bring your own laptop if you can
80+
- Join the [Gitter channel](https://gitter.im/py-sprints/pandas-bokeh) of the sprint

_sponsors/ecom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
obj_id: ecom
3+
name: "Ecom Recruitment"
4+
logo: static/images/sponsors/ecom.png
5+
link: https://www.interquestgroup.com/brands/ecom
6+
address: "Cannon Green, 27 Bush Lane, London, United Kingdom, EC4R 0AA"
7+
lat: 51.510744
8+
lng: -0.0917458
9+
---
10+
ECOM is the digital talent brand of InterQuest Group. We have won the award for being LinkedIn’ most socially engaged staffing agency in 2016, 2017 and 2018. We operate at the forefront of digital transformation. We recruit the in-demand, technical skills that are shaping the new digital economy across analytics, information security, digital, information technology, networks & change management. We look to partner with our clients to bring optimized solutions to help them create opportunities for talented individuals across the verticals we serve.

static/images/sponsors/ecom.png

14.7 KB
Loading

0 commit comments

Comments
 (0)