I don\'t understand why method1 is fine but not the second ...
method 1
import pandas as pd import collections d = collections.Ordered