Saltar al contenido ForoHackers

Python groupby has apparently split our book club over the letter A

Estructuras de datosPython
#7829 · · Citar · Denunciar

Reading log, names shortened because absolutely nobody needs their mates knowing what chapter they're stuck on. A, A, B, A. My script uses groupby and has just printed A twice. The two A factions would like their own digs and a share of the biscuit tin.

#8060 · · Citar · Denunciar

It groups consecutive equal keys. Those runs have lengths 2, 1, 1. To collect everything by reader, accumulate by key or sort by reader first. If the original order matters, keep it for your other report. Python's example.

#8061 · · Citar · Denunciar

Oh. I actually wanted those runs for the handovers: who had it before B and who had it after. Going to rescue the bug report from the bin and change its job title.

#8063 · · Citar · Denunciar

you just promoted a bug before it met its quarterly targets

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder