Python包df2onehot将pandas数据帧转换为结构化数据帧。
df2onehot的Python项目详细描述
df2onehot公司
Star it if you like it!
- df2onehot是一个Python包,用于将复杂的数据帧转换为一个热的密集数组。在
内容
安装
- 从PyPI安装df2onehot(推荐)。df2onehot与python3.6+兼容,可以在Linux、macosx和Windows上运行。在
- 它是根据麻省理工学院的许可证发行的。在
快速启动
^{pr2}$- 或者,从GitHub源安装df2onehot:
git clone https://github.com/erdogant/df2onehot.git
cd df2onehot
python -U setup.py install
导入df2onehot包
importdf2onehot
示例:
df=df2onehot.import_example()# Convertout=df2onehot.df2onehot(df)
# Force features (int or float) to be numeric if unique non-zero values are above percentage.out=df2onehot.df2onehot(df,perc_min_num=0.8)
# Remove categorical features for which less then 2 values exists.out=df2onehot.df2onehot(df,y_min=2)
# Combine two rules above.out=df2onehot.df2onehot(df,y_min=2,perc_min_num=0.8)
维修人员
- Erdogan Taskesen,github:erdogant
- 欢迎投稿。在
- 如果你想为这项工作请我喝杯咖啡,我非常感激:)
标签:
- 项目
标签: