Spaces:
Sleeping
Sleeping
File size: 569 Bytes
c49f0b0 c88b2dc c49f0b0 c88b2dc c49f0b0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Transcript Retrieval
def retrieve_transcript(data, year, quarter, ticker):
print(year, quarter, ticker)
row = data.loc[
(data.Year == int(year))
& (data.Quarter == quarter)
& (data.Ticker == ticker),
["File_Name"],
]
filename = row.iloc[0, 0]
print(filename)
# convert row to a string and join values with "-"
# row_str = "-".join(row.astype(str)) + ".txt"
open_file = open(
f"Transcripts/{ticker}/{filename}",
"r",
)
file_text = open_file.read()
return f"""{file_text}"""
|