Created
September 27, 2022 08:16
-
-
Save mikekenneth/ea2438b266c57bdc4a57361e79765a09 to your computer and use it in GitHub Desktop.
Plotting multilple line plot with Pandas & Matplotlib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| data = { | |
| 'ip_address': ['10.10.1.2','10.10.1.3','10.10.1.4','10.10.1.5','10.10.1.6','10.10.1.7','10.10.1.8'], | |
| 'latency': [278,353,658,517,62,485,875], | |
| 'packet_size': [773,9860,4618,1056,9568,8124,4605]} | |
| df = pd.DataFrame(data=data) | |
| print(df.head()) | |
| df.plot(x='ip_address', y=['latency', 'packet_size'], kind='line') | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment