【问题标题】:Parsing url,hashtags out of twitter text从 twitter 文本中解析 url、hashtags
【发布时间】:2017-04-02 21:05:08
【问题描述】:

我已经提取了 csv 文件中的所有推文,我想将推特文本与主题标签和网址分开,到目前为止,我已经使用

在 excel 中对主题标签进行了锯齿化处理

数据 -> 文本到列

首先我不知道如何使用这种方法分隔 url 其次,有没有更好的方法来做到这一点?所有在线链接在报废时都将两者分开

TEXT
Learned a new concept today : metamorphic testing.  http:/t.co/0is1IUs3aW
variant identification in pooled DNA using R http:/t.co/4PQfUaU
Meta-All: a system for managing metabolic pathway information http:/t.co/2PfJXUxq2X

它应该是这样的

 TEXT                                                                 URL
  Learned a new concept today : metamorphic testing.                  http:/t.co/0is1IUs3aW
  variant identification in pooled DNA using R                        http:/t.co/4PQfUaU  
  Meta-All: a system for managing metabolic pathway information       http:/t.co/2PfJXUxq2X    

现在文本和网址都在一个列中,我想将它们放在不同的列中

【问题讨论】:

  • 如果没有您正在处理的数据样本,以及您想用它做什么的完整描述,您不可能得到任何有用的建议。
  • @TimWilliams 希望现在有所帮助。

标签: excel csv parsing twitter


【解决方案1】:

从 A2 中提取 URL:=MID(A2,FIND("http",A2),500)

A2 的其余部分:=MID(A2,1,FIND("http",A2)-1)

【讨论】:

    【解决方案2】:

    我会使用一组简单的公式。

    =find()    
    =left()    
    =Right()
    

    Here are the formula's I used

    Here are the results of those formulas

    基本上,find() 公式可以让您找到 ""Http:" 在字符串中的位置。Left() 允许您 print() 左侧的所有内容。Right() 让您获取所有内容右边。

    【讨论】:

      猜你喜欢
      • 2023-04-05
      • 1970-01-01
      • 2015-08-30
      • 2011-09-24
      • 2023-03-08
      • 1970-01-01
      • 2011-04-08
      • 2012-09-14
      • 2012-03-05
      相关资源
      最近更新 更多