Hello, I am trying to get some factor and price data for different companies that have ESG scores available as well. My code looks like:
df, err = ek.get_data("SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeCountryCode,""SE""), TR.TRESGScore(Period=FY0)>0, CURN=USD)",
["TR.PriceClose", "TR.PriceClose.Date", "TR.EBITMarginPercent", "TR.PretaxROAPercent", "TR.FreeOperatingCashFlowExclDividends","TR.RevenueSmartEstLastYrGrowth" , "TR.FreeCashFlow", "TR.WACCBeta"],
{'SDate': '2010-01-01', 'EDate': '2022-01-29','Frq':'M', 'SORTD': 'date'})
The only problem is that some companies don't have price data for all periods, but the empty periods are still included as NaN. Is there a easy way to make so that if there is no price data at date n, that whole row is not included.
Thanks in advance!