Skip to content

Tag: python-3.x

Percentile Python, problems Setting values

Im calculating percentiles and doing some operations along too many columns. I need to get the unique values then, setting my vector i got this: It works in almost all of the columns, but for any reason i got columns with this issue: then calculating percentiles: then, setting this vector i got this: Setting …

alternately flatten values of nested list

Is there a way to flatten values of a nested list but alternately? example: my expected output would be: Answer You can do it without numpy using iterators and keep track when the list stops growing: IF you have None values in your list, you need to choose another sentinel value.