本文最后更新于 197 天前,其中的信息可能已经有所发展或是发生改变。
应用自定义包输出空值占比的可视化图形
1. 用法1如下:检测空值
# 导入自定义包
pip install kedaofx
from kedaofx import Show
# 数据
data = pd.DataFrame(
{'name': ['s1', 's2', 's3', None, None, 'a', 'a', 0, 0, 0],
'age1': [None, 23, 24, 25, 27, 'a', 0, 0, 0, 0],
'age2': [None, 23, 24, 25, 27, 0, 0, 0, 0, 0],
'age3': [3, 23, 24, 25, 27, 3, 3, 4, 5, 6],
'age4': [0, 23, 24, 25, 27, 'a', 1, 1, 1, 1]})
# 检测为Null的值在整个数据中的占比
Show.show_null(data)
2. 用法2如下:检测固定格式的空值
# 检测为空值在数值列(ops_int)下在整个数据中的占比
Show.show_null(data, ops_int=0)
# 检测为空值在字符串列条件(ops_str)下在整个数据中的占比
Show.show_null(data, ops_str='a')
# 检测为空值在数值列(ops_int)及字符串列条件(ops_str)下在整个数据中的占比
Show.show_null(data, ops_int=0, ops_str='a')
Good day! I just wish to offer you a big thumbs up for your great information you have right
here on this post. I am coming back to your website for more soon.
Im pretty pleased to find this great site. I need to to thank you for ones time for this particularly fantastic read!! I definitely loved every little bit of it and I have you saved as a favorite to see new stuff on your blog.
Can I simply say what a comfort to find someone who actually understands what they are discussing on the net. You definitely understand how to bring an issue to light and make it important. More people should check this out and understand this side of the story. I was surprised that you are not more popular since you most certainly have the gift.
Thanks for your blog, nice to read. Do not stop.