Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5c2107a

Browse files
committedJul 23, 2019
checklist changes
1 parent 2e401e1 commit 5c2107a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed
 

‎python/plot-data-from-csv.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jupyter:
3737
---
3838

3939

40-
#### Imports
41-
42-
#### A Simple Example
4340
CSV or comma-delimited-values is a very popular format for storing structured data. In this tutorial, we will see how to plot beautiful graphs using csv data, and Pandas. We will learn how to import csv data from an external source (a url), and plot it using Plotly and pandas.
4441

4542
First we import the data and look at it.
@@ -50,6 +47,21 @@ df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_
5047
df.head()
5148
```
5249

50+
### Plot from CSV with Plotly Express
51+
52+
```python
53+
import pandas as pd
54+
import plotly.express as px
55+
56+
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_apple_stock.csv')
57+
58+
fig = px.line(df, x = 'AAPL_x', y = 'AAPL_y', title='Apple Share Prices over time (2014)')
59+
fig.show()
60+
```
61+
62+
63+
### Plot from CSV with `graph_objects`
64+
5365
```python
5466
import pandas as pd
5567
import plotly.graph_objects as go

0 commit comments

Comments
 (0)
Please sign in to comment.