Output exceeds the size limit. Open the full output data in a text…
- User
Output exceeds the size limit. Open the full output data in a text editor--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[49], line 8 6 cond = [un & (rd[zone] == 1), un & (rd[zone] == 2), un & (rd[zone] == 3), un & (rd[zone] == 4)] 7 choice = [list(i) for i in zones_ar_i] ----> 8 rd[f'reject_filter_{zone}'] = np.select(cond, choice, rd[f'reject_filter_{zone}'])
File <array_function internals>:180, in select(*args, **kwargs)
File c:\Work\Anaconda3\envs\py_modeler\lib\site-packages\numpy\lib\function_base.py:839, in select(condlist, choicelist, default) 835 # Convert conditions to arrays and broadcast conditions and choices 836 # as the shape is needed for the result. Doing it separately optimizes 837 # for example when all choices are scalars. 838 condlist = np.broadcast_arrays(*condlist) --> 839 choicelist = np.broadcast_arrays(*choicelist) 841 # If cond array is not an ndarray in boolean format or scalar bool, abort. 842 for i, cond in enumerate(condlist):
File <array_function internals>:180, in broadcast_arrays(*args, **kwargs)
File c:\Work\Anaconda3\envs\py_modeler\lib\site-packages\numpy\lib\stride_tricks.py:540, in broadcast_arrays(subok, *args) 533 # nditer is not used here to avoid the limit of 32 arrays. 534 # Otherwise, something like the following one-liner would suffice: 535 # return np.nditer(args, flags=['multi_index', 'zerosize_ok'], 536 # order='C').itviews ... 425 # ironically, np.broadcast does not properly handle np.broadcast 426 # objects (it treats them as scalars) 427 # use broadcasting to avoid allocating the full array
ValueError: shape mismatch: objects cannot be broadcast to a single shape. Mismatch is between arg 0 with shape (286,) and arg 1 with shape (2745,).
- Assistant
- User
Сделай этот график красивее, приведи к шкале от 1 до 100, выведи маркеры и подписи, покажи, что это график структуры выдачи appr_scores = [f'appr_flag_{zone}' for zone in zone_scores_val] (pd.pivot_table(data=rd, index='app_date_month',values=appr_scores, aggfunc='mean').mean(axis=1).round(3)*100).plot()
flag_scores = [f'flag_{zone}' for zone in zone_scores_val] (pd.pivot_table(data=rd, index='app_date_month',values=flag_scores, aggfunc='mean').mean(axis=1).round(3)*100).plot()
(pd.pivot_table(data=rd, index='app_date_month',values=appr_scores, aggfunc='mean').mul(tr_rates_df['tr_flag'].values, axis=0).mean(axis=1).round(3)*100).plot()
- Assistant
- User
А как еще вывести округленные маркеры значений для каждой точки?
- Assistant
Для вывода округлённых маркеров значений (текста около маркеров с округлёнными значениями) рядом с каждой точкой на графике, вы можете использовать метод из Matplotlib в цикле по значениям, которые хотите аннотировать. В приведённом ниже коде показано, как можно добавить аннотации к трем графикам, созданным в предыдущем примере.
- User
Start a new merge request with these changes что это означает?
- Assistant
Фраза "Start a new merge request with these changes" относится к процессу работы с системами контроля версий, такими как Git, в контексте, где используется веб-интерфейс для управления репозиториями, например, GitLab или GitHub. Это указание или предложение внести предложенные изменения кода (или других файлов в проекте) путём создания нового запроса на слияние (merge request) или запроса на вытягивание (pull request) для рассмотрения и интеграции в основную ветку проекта. Вот пошаговое описание того, что это обычно влечёт за собой в контексте GitLab (где обычно используются термины merge request) или GitHub (где используются термины pull request):