๐Ÿ† ์ž๊ฒฉ์ฆ, ์–ดํ•™

[๋น…๋ฐ์ดํ„ฐ ๋ถ„์„๊ธฐ์‚ฌ] ์‹ค๊ธฐ 4ํšŒ - int

๋ฐ์ดํ„ฐํŒ์Šค 2024. 8. 19. 16:48

 

df['ratio']=(df['Likes']/df['Comments'])
cond1=(df['ratio']>=20)
cond2=(df['Keyword']=='minecraft')
mean=df[cond1&cond2]['Views'].mean()

int(mean)
import math
math.trunc(mean)
 
 

 

์ •์ˆ˜ํ˜•์œผ๋กœ ํ‘œํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ• ๋‘๊ฐ€์ง€

int(๊ฐ’)
import math
math.trunc(๊ฐ’)