Import NumPy under the alias np
.
Import pandas under the alias pd
.
Using df1
and df2
as specified below, merge them using the key key
. Specify how = inner
as an argument.
df1 = pd.DataFrame({'key': ['foo', 'bar', 'baz', 'foo'],
'value': [1, 2, 3, 5]})
df2 = pd.DataFrame({'key': ['foo', 'bar', 'baz', 'foo'],
'value': [5, 6, 7, 8]})
#Solution goes here