Posts by Lucas Secundo • 1 point
2 posts
-
0
votes1
answer29
viewsA: Python: loop to "clip" (winsorizing) numerical data on a dataframe, assigning the result to a dictionary
I solved the problem: #clipando: retorno_clipado = retornos_dia for acao in acoes: for contar,r in enumerate(retornos_dia[acao]): if r > max[acao]: retorno_clipado[acao][contar] = max[acao] elif…
pandasanswered Lucas Secundo 1 -
-1
votes1
answer29
viewsQ: Python: loop to "clip" (winsorizing) numerical data on a dataframe, assigning the result to a dictionary
What’s wrong with this code? #calculando retornos diários máximos e mínimos: max_std = 3 max = {} min = {} retornos_stds = retornos_dia.std() retornos_med = retornos_dia.mean() for acao in acoes:…
pandasasked Lucas Secundo 1