我最近將 Python 升級到 3.7.6 和我現(xiàn)有的代碼:df['Simple_Avg_Return'] = df.groupby(['YF_Ticker'])['Share_Price_Delta_Percent', 'Dividend_Percent'].transform( sum).divide(2).round(2) 現(xiàn)在拋出這個警告:FutureWarning: Indexing with multiple keys (implicitly converted to atuple of keys) will be deprecated, use a list instead. 我將如何按照建議將其轉換為列表以及在哪里?
Python FutureWarning:使用多個鍵進行索引(隱式轉換為鍵元組)
慕田峪7331174
2022-11-09 16:43:57