I'm following along with the 2017 (Second Edition) O'Reilly Python for Data Analysis book (which uses Python 3.6) and encountered this basic code for an inner merge (with the output as I see it, having now tried in multiple shells, and not how the output appears in the book):
import pandas as pd
df1 = pd.DataFrame({'key': ['b', 'b', 'a', 'c', 'a', 'a',' b'], 'data1':range(7)})
df2 = pd.DataFrame({'key': ['a', 'b', 'd'], 'data2': range(3)})
print(df1)
print(df2)
pd.merge(df1, df2)
Yet the book has a result (from identical code) yielding:
Why would the row for b with data1 as 6 and data2 as 1 be cut? If b is a shared key value, my understanding was that you would see a row for that key value with corresponding data1 and data2 values?

