Tejapi資料科學, Lasso Regression, Economic Growth, Macroeconomics, Alpha.
data[data['代碼'] == i] p = p['數值'] df.setdefault(i, p) df = pd.concat(df, axis = 1) 先設定「年月」為index，再透過迴圈列出各別指標的數據，最後將其並列排序。 Step 3. 選擇經濟成長率指標 # 列出所有經濟成長率指標 growth_reference = list(factor['總經代碼'][i] for i in range(0,427) if '經濟成長率' in factor.iloc[i,1]) factor[factor['總經代碼'].isin(growth_reference)] #