我正在尝试将 Outlook 邮件项目读入R保存在我的硬盘中(以 .msg 格式保存)。但不能这样做。有人可以帮助我理解,我该如何做?我加载tm.plugin.mail了相同的库。
library(tm.plugin.mail)
obj <- readMail(DateFormat="%m %d %Y %H:%M", mail="Crux_info_Detail.msg")
Run Code Online (Sandbox Code Playgroud)
当我说 obj 时,它没有给出文件的任何内容。我在这里错过了什么?如何将邮件项目读入 R。
提前致谢。
我需要将 csv 规范文件转换为 YAML 文件以满足项目需要。我为此编写了一小段 python 代码,但它没有按预期工作。我无法使用任何在线转换器,因为我工作的客户不会接受。这是我的Python代码:
import csv
csvfile = open('custInfo.csv', 'r')
datareader = csv.reader(csvfile, delimiter=',', quotechar='"')
data_headings = []
yaml_pretext = "sourceTopic : 'BIG_PARTY'"
yaml_pretext += "\n"+'validationRequired : true'+"\n"
yaml_pretext += "\n"+'columnMappingEntityList :'+"\n"
for row_index, row in enumerate(datareader):
if row_index == 0:
data_headings = row
else:
# new_yaml = open('outfile.yaml', 'w')
yaml_text = ""
for cell_index, cell in enumerate(row):
lineSeperator = " "
cell_heading = data_headings[cell_index].lower().replace(" ", "_").replace("-", "")
if (cell_heading == "source"):
lineSeperator = ' - ' …Run Code Online (Sandbox Code Playgroud)