首页 > 编程知识 正文

pfn_list_corrupt蓝屏win7,pandas使用

时间:2023-05-03 14:37:33 阅读:173622 作者:4216

fix unique bin error:

duplicates='drop '

删除质量

rankyourdatawithdataframe.rank (method=“first”).therankingassignsauniquevaluetoeachelementinthedataframe ) therank whilekeepingtheorderoftheelements (exceptforidenticalvalues,whichwillberankedinordertheyappearinthearrry,seemethod=‘fithod

Example:

PD.qcut(df,nbins )-- this generates谨慎的绿草: Bin edges must be unique "

Then use this instead:

PD.qcut(df.rank ) method='first ',nbins ) )

Specify a custom quantiles range,e.g. [0, 50, 75,1.] togetunequalnumberofitemsperquantile

use pandas.cutthatchoosesthebinstobeevenlyspacedaccordingtothevaluesthemselves,while pandas.qcutchoosesthebinssothatyouathouhatyouhatyouhavathatyouhavespallllesphespathespatt

Difference between qcut and cut

qcut:保证每组数量的平均

cut:由组内的values分开,组内不一定平均

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。