You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: unconverted/python/peak-finding.md
+55-76
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,19 @@ jupyter:
8
8
format_version: '1.1'
9
9
jupytext_version: 1.1.1
10
10
kernelspec:
11
-
display_name: Python 2
11
+
display_name: Python 3
12
12
language: python
13
-
name: python2
13
+
name: python3
14
+
language_info:
15
+
codemirror_mode:
16
+
name: ipython
17
+
version: 3
18
+
file_extension: .py
19
+
mimetype: text/x-python
20
+
name: python
21
+
nbconvert_exporter: python
22
+
pygments_lexer: ipython3
23
+
version: 3.6.7
14
24
plotly:
15
25
description: Learn how to find peaks and valleys on datasets in Python
16
26
display_as: peak-analysis
@@ -26,131 +36,100 @@ jupyter:
26
36
title: Peak Finding in Python | plotly
27
37
---
28
38
29
-
#### New to Plotly?
30
-
Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/).
31
-
<br>You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-for-online-plotting) or [offline](https://plot.ly/python/getting-started/#initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plot.ly/python/getting-started/#start-plotting-online).
32
-
<br>We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!
33
-
34
-
35
39
#### Imports
36
-
The tutorial below imports [NumPy](http://www.numpy.org/), [Pandas](https://plot.ly/pandas/intro-to-pandas-tutorial/), [SciPy](https://www.scipy.org/) and [PeakUtils](http://pythonhosted.org/PeakUtils/).
40
+
The tutorial below imports [Pandas](https://plot.ly/pandas/intro-to-pandas-tutorial/), and [SciPy](https://www.scipy.org/).
37
41
38
42
```python
39
-
import plotly.plotly as py
40
-
import plotly.graph_objs as go
41
-
from plotly.tools import FigureFactory asFF
42
-
43
-
import numpy as np
44
43
import pandas as pd
45
-
import scipy
46
-
import peakutils
44
+
from scipy.signal import find_peaks
47
45
```
48
46
49
47
#### Import Data
50
48
To start detecting peaks, we will import some data on milk production by month:
0 commit comments