标签: performance pandas
为什么select_dtypes这么慢?
%timeit [col for col in df.columns if np.issubdtype(df[col].dtype, np.number)]
每循环453微秒
%timeit df.select_dtypes(include=[np.number])
每循环4.58秒