import pandas as pd // use difference method baseball_14.index.difference(baseball_15.index)
Here is what the above code is Doing:
1. We’re using the index attribute to get the index of baseball_14.
2. We’re using the difference method to find the set difference between the two DataFrames.
3. We’re assigning the result to disjoint.