Solution for SpecificationError: nested renamer is not supported while agg() along with groupby()

前端 未结 10 2200
有刺的猬
有刺的猬 2020-12-15 21:23
def stack_plot(data, xtick, col2=\'project_is_approved\', col3=\'total\'):
    ind = np.arange(data.shape[0])

    plt.figure(figsize=(20,5))
    p1 = plt.bar(ind, d         


        
10条回答
  •  离开以前
    2020-12-15 22:11

    I have got the similar issue as @akshay jindal, but I check the documentation as suggested by @artikay Khanna, the problem solved, some functions has been adjusted, the old is deprecated. Here is the code warning provided per last time execute.

    /usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation
    is deprecated and will be removed in a future version. Use                 named aggregation instead.
    
        >>> grouper.agg(name_1=func_1, name_2=func_2)
    
      """Entry point for launching an IPython kernel.
    

    Therefore, I will suggest try

    grouper.agg(name_1=func_1, name_2=func_2)
    

    Hope this will help

提交回复
热议问题