例如:
import pandas as pd
# 示例数据
data = {'短视频引流占比': [0.4, 0.55, 0.6, ...], '销售额': [12000, 15000, 18000, ...]}
df = pd.DataFrame(data)
correlation = df['短视频引流占比'].corr(df['销售额'])
print(f"相关系数: {correlation}")
例如:
# 示例数据
top3_referrals = [2000, 1800, 1500] # TOP3直播间各自的引流人数
total_referrals = sum(top3_referrals) + other_referrals # 总引流人数
top3_ratio = (sum(top3_referrals) / total_referrals) * 100
print(f"TOP3直播的引流人次占比: {top3_ratio}%")
例如:
# 示例数据
category_distribution = {'服装': 20, '食品': 15, '电子产品': 18, ...}
most_attractive_categories = [key for key, value in category_distribution.items() if value > 15]
print(f"最吸引用户的类别: {most_attractive_categories}")
例如:
# 示例数据
fan_count_distribution = [10, 50, 200, ...]
referral_effectiveness_by_fan_count = [(count, sum(referrals) / count) for count in fan_count_distribution]
for count, effectiveness in referral_effectiveness_by_fan_count:
print(f"粉丝数: {count}, 引流效率: {effectiveness}%")
以上分析数据来源:互联岛