Tag: GROUPING
Cuando envío una cadena de intentos UPI a través de SMS, no se reconoce como un enlace que se pueda hacer clic. La cadena de intentos UPI que envío se ve así: upi://pay?pa=testuat@icici&pn=test&tr=EZV2021111610485300031599&am=1.00&cu=INR&mc=5411 Lo he probado en un teléfono Samsung Galaxy y en un Oneplus, pero la cadena de intentos . . . Read more
Tengo un marco de datos de pandas así: Id a b c d x 1 1 1 01/01/2021 x 1 1 0 01/05/2021 y 1 1 1 02/01/2021 y 1 1 1 02/01/2021 Id a b c d x 2 1 1 01/01/2021 y 1 1 1 02/01/2021 Quiero sumar . . . Read more
Cambio las imágenes por valores hash e intento clasificar las imágenes con valores hash similares en el mismo grupo. Por ejemplo: import imagehash img1_hash = imagehash.average_hash(Image.open(‘data/image1.jpg’)) img2_hash = imagehash.average_hash(Image.open(‘data/image2.jpg’)) img3_hash = imagehash.average_hash(Image.open(‘data/image3.jpg’)) img4_hash = imagehash.average_hash(Image.open(‘data/image4.jpg’)) print(img1_hash, img2_hash, img3_hash, img4_hash) >> 81c38181bf8781ff, 81838181bf8781ff, 81838181bf8781ff, ff0000ff3f00e7ff hash_lst = [[‘img1’, img1_hash], [‘img2’, img2_hash], . . . Read more
Mi aplicación .Net / C# almacena cierta información en Mongodb. Los documentos de Mongodb tienen la siguiente estructura correspondiente en C#: public class GlobalInfo { public ObjectId Id { get; set; } public string Country { get; set; } public string City { get; set; } public int Population { . . . Read more
Necesito aplicar una función que devuelva un data.frame en un tibble agrupado. Algunos datos: df <- data.frame(start=1:10,end=21:30,g=sample(LETTERS[1:2],10,replace=TRUE)) ff <- function(start,end,… ) { out <- data.frame(T1=c(start,rev(start)),T2=c(end,rev(end))) return(out) } Luego, me gustaría hacer algo como esto: library(dplyr) library(purrr) df %>% group_by(g) %>% pmap_dfr( ff,.keep=TRUE) Para producir un tibble/data.frame como este: g start . . . Read more