In [3]:
import pandas as pd
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
df = pd.read_csv("https://raw.githubusercontent.com/democratia/political_science/master/Daten/libor-zinsen.csv", sep=",")
currencies = list(df)[1:]
print(currencies)
In [5]:
traces = []
for i in currencies:
print(i)
traces.append(go.Scatter(
x=df["Monat"],
y=df[i],
mode='lines',
connectgaps=True,
name=i
))
layout = go.Layout(
title='Libor interest rate for different currencies',
xaxis=dict(title='Month'),
yaxis=dict(title='Interest rate')
)
fig = go.Figure(data=traces, layout=layout)
py.iplot(fig, filename='libor-interest-rate')
Out[5]:
In [ ]: