基于提供的数据,我们可以从以下几个维度进行分析:
引流效率:
头部效应:
类目特征:
粉丝体量:
计算相关性(引流效率):
import pandas as pd
# 假设 df 是包含所有直播间数据的 DataFrame,其中包括 '短视频引流占比' 和 '销售额'
correlation = df['短视频引流占比'].corr(df['销售额'])
print("Correlation between video traffic and sales:", correlation)
计算头部效应:
top3_df = df.head(3) # 假设 top3 包含前3名直播间的数据
total_traffic = df['引流人次'].sum()
top3_traffic = top3_df['引流人次'].sum()
print("Percentage of traffic from top 3:", (top3_traffic / total_traffic) * 100)
分析类目特征:
# 假设 '带货类目' 是 DataFrame 中的一个列
category_sales = df.groupby('带货类目')['销售额'].sum().sort_values(ascending=False)
print("Top-selling categories based on sales:")
print(category_sales)
分析粉丝体量:
# 假设 '粉丝数' 是 DataFrame 中的一个列
fan_group = pd.cut(df['粉丝数'], bins=[0, 10000, 50000, 100000, float('inf')])
grouped_df = df.groupby(fan_group).agg({'引流人次': 'sum', '销售额': 'sum'})
print("Fan group analysis:")
print(grouped_df)
以上分析数据来源:互联岛