【发布时间】:2022-08-03 21:37:36
【问题描述】:
我想澄清一下,因为我想知道为什么推文长度到达 800 时,推文文本可以或可以有 280(更少或更多)字符? 做这个脚本我有这个面板。也许我错了。也许我也有 len 内的空间计数?
# Exploring the text lengths
lunghezza = df[\'text\'].astype(str).apply(len)
# visualize the text length
plt.figure(figsize=(50,44))
plt.xticks(fontsize=80)
plt.yticks(fontsize=80)
plt.hist(lunghezza, edgecolor = \"black\", color=\'darkturquoise\');
plt.grid(True, color=\'gray\', linestyle=\'dashed\', linewidth=0.5, axis=\'y\')
# Define x-axis label
plt.xlabel(\"Length Tweets\", fontsize=80)
# Define y-label
plt.ylabel(\"Number Tweets\",fontsize=80)
plt.suptitle(\'Visualize the text length\', fontsize=90)