The problem is that the DataReader function for the famafrech database returns a dictionary of DataFrame objects. It happens to be that for the F-F_Research_Data_Factors, the keys of that dict are [0, 1]. The keys for the 10_Industry_Portfolios dataset are [4, 6, 8, 10, 12, 14, 16, 18]. You can check this as follows:

So, to be clear, the problem was with the [0] you had after the call to DataReader. The [0] was ok in the first example because that was one of the keys of that dict, but it was not one of the keys to the second dict.