Started the Hubspot script for Tracy... super confusing. Added a few notes and template items.
This commit is contained in:
@ -5,22 +5,31 @@ import itertools
|
||||
|
||||
ndir = Path("/Users/normrasmussen/Documents/Work/CustomerNotes/")
|
||||
|
||||
|
||||
def get_files():
|
||||
list_of_lists = []
|
||||
merge = pd.DataFrame()
|
||||
merge3 = pd.DataFrame()
|
||||
merged = pd.DataFrame()
|
||||
dict_copy = pd.DataFrame()
|
||||
empty_temp = pd.DataFrame()
|
||||
files = list(ndir.glob("**/*.md"))
|
||||
for company in files:
|
||||
# This Section gets the Company name for the payload.
|
||||
company = str(company)
|
||||
company_file = company.split("/")[-1]
|
||||
company_name = company_file[:-3]
|
||||
# if company_name == "Bolt":
|
||||
|
||||
list_of_dicts = get_data(company_file, company_name)
|
||||
# This returns a list of dictionaries - one list per company
|
||||
|
||||
dic = pd.DataFrame.from_records(list_of_dicts)
|
||||
# This gets overwritten for each list out put by the function.
|
||||
# So once a list comes out, it needs to be copied.
|
||||
|
||||
dict_copy = dic.copy()
|
||||
merge = pd.concat([dict_copy, merge], ignore_index=True)
|
||||
# Now that it is copied.. merge it here first?
|
||||
|
||||
empty_temp = pd.concat([dict_copy, empty_temp], ignore_index=True)
|
||||
merge = pd.concat([empty_temp, merge], ignore_index=True)
|
||||
merge.to_csv("/Users/normrasmussen/Downloads/Notes_for_GS.csv")
|
||||
print(merge)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user