Analizando la rentabilidad de los tags más populares en Hive con Python [ESP/ENG]
Este código utiliza la librería beem y pandas para analizar la ganancia en HBD (una moneda digital en la plataforma Hive) asociada con los 10 tags más populares en la plataforma Hive.
El código define una función llamada comments_payouts que toma una fila de un DataFrame como entrada y devuelve el resultado de dividir el valor total de los pagos (total_payouts) por el número de publicaciones de mayor pago (top_posts).
A continuación, se crea un objeto q que utiliza la clase Query de beem para acceder a los tags más populares en la plataforma Hive. Se utiliza la función Trending_tags para agregar los tags a una lista y crear un DataFrame (df) con estos datos.
Se reemplaza el texto " HBD" en la columna "total_payouts" con valores numéricos para que sea posible realizar cálculos con ellos. Luego, se filtra el DataFrame para mostrar solo aquellos tags que tienen más de 500 comentarios, y se ordena de mayor a menor por número de comentarios.
Por último, se agrega una nueva columna llamada "ganancia" al DataFrame utilizando la función comments_payouts y el método apply de pandas, y se imprime el resultado final.
Este código puede ser útil para aquellos que deseen conocer las ganancias asociadas con los tags más populares en la plataforma Hive y comparar la relación entre el número de comentarios y los pagos en HBD.
ENGLISH
This code uses the beem and pandas library to analyze the HBD (a digital currency on the Hive platform) payout associated with the 10 most popular tags on the Hive platform.
The code defines a function called comments_payouts that takes a row of a DataFrame as input and returns the result of dividing the total value of payouts (total_payouts) by the number of top paying posts (top_posts).
Next, a q object is created that uses beem's Query class to access the most popular tags in the Hive platform. The Trending_tags function is used to add the tags to a list and create a DataFrame (df) with this data.
The text "HBD" in the column "total_payouts" is replaced with numeric values so that calculations can be performed with them. Then, the DataFrame is filtered to show only those tags that have more than 500 comments, and sorted from highest to lowest by number of comments.
Finally, a new column called "gain" is added to the DataFrame using the comments_payouts function and the apply method of pandas, and the final result is printed.
This code may be useful for those who want to know the earnings associated with the most popular tags in the Hive platform and compare the relationship between the number of comments and payouts in HBD.
▶️ 3Speak
Leave Analizando la rentabilidad de los tags más populares en Hive con Python [ESP/ENG] to:
Read more #programming posts
Best Posts From Maicol Ortega
We have not curated any of buritica's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Maicol Ortega
- Creando contrato inteligente, PIEDRA, PAPEL O TIJERA, PROGRAMACIÓN
- Analizando la rentabilidad de los tags más populares en Hive con Python [ESP/ENG]
- Telegram Bot Hive with python
- Hive Telegram Bot con Python!
- BOT DE WHATSAPP ENVIA MENSAJES MASIVOS CON PYTHON!
- QUE ES LAMDEN? DATOS CURIOSOS SOBRE ESTA BLOCKCHAIN- [WHAT IS LAMDEN SUBS IN ENGLISH]
- 3 MANERAS GRATIS DE GANAR CRIPTOMONEDAS! [ENGLISH SUBTITLES]
- [ESP-ENG] Generar ingresos desde la web3 [Shorts 3speak ] Iniciativa #MiThreeShort
- My Hivewatchers blacklist. My apology to the Hive community
- ME PRESENTO A LA COMUNIDAD DE HIVE! VEN A CONOCERME! [ENG/ESP]
- UNISWAP VS SUSHISWAP GRAN HISTORIA DE LAS DEFI!
- TE PUEDEN ROBAR TUS CRIPTOMONEDAS! NOTICIAS CRIPTO!
- CHIGUIERELAND Y SU TIERRA EN THE SANDBOX (VIDEO)
- Shiba Token te puede hacer millonario!
- CONCURSO DE 1000$ EN NFT BINANCE SMART CHAIN!
- GANA 5 DOLARES FACIL Y RAPIDO EN CRIPTOMONEDAS!
- NUEVO JUEGO BLOCKCHAIN PARA GANAR DINERO-LOST RELICS
- Lost Realics New game with crypt coins
- Lost Realics Nuevo juego con criptomonedas
- Call of duty mobile live