test_converter_utils.py 文件源码

python
阅读 50 收藏 0 点赞 0 评论 0

项目:py_stringsimjoin 作者: anhaidgroup 项目源码 文件源码
def setUp(self):
        float_col = pd.Series(pd.np.random.randn(10)).append(
            pd.Series([pd.np.NaN for _ in range(10)], index=range(10, 20)))
        float_col_with_int_val = pd.Series(
                                     pd.np.random.randint(1, 100, 10)).append(          
            pd.Series([pd.np.NaN for _ in range(10)], index=range(10, 20)))        
        str_col = pd.Series([random.choice(string.ascii_lowercase) 
                      for _ in range(10)]).append(
            pd.Series([pd.np.NaN for _ in range(10)], index=range(10, 20)))
        int_col = pd.Series(pd.np.random.randint(1, 100, 20))                           
        nan_col = pd.Series([pd.np.NaN for _ in range(20)])                

        self.dataframe = pd.DataFrame({'float_col': float_col,
                               'float_col_with_int_val': float_col_with_int_val,
                               'int_col': int_col,
                               'str_col': str_col,
                               'nan_col': nan_col})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号