-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadRawDataAddIntoDataframe.py
More file actions
24 lines (19 loc) · 934 Bytes
/
Copy pathreadRawDataAddIntoDataframe.py
File metadata and controls
24 lines (19 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
# (C) Copyright 2019-2020, PwC
#
# @brief Extract texts from downloaded content and put them into the dataframe
from framework.readData.readFullData import readFullData
from framework.commonConstants import *
import pandas as pd
from os.path import join
from config import rootDir, basicDataframe, dataframeWithContent
dfPath = join(rootDir, basicDataframe + PKL)
def readRawDataAddIntoDataframe(dfPath, downloadPath, masterDataframeWithContent):
df = pd.read_pickle(dfPath)
dataObject = readFullData(dataframe=df, downloadPath=downloadPath)
df = readFullData.populatingFullContentForPDF(dataObject)
df.to_pickle(join(downloadPath, masterDataframeWithContent + PKL))
if __name__ == '__main__':
readRawDataAddIntoDataframe(dfPath=dfPath,
downloadPath=rootDir,
masterDataframeWithContent=dataframeWithContent)