Ubuntu

update files

This diff is collapsed. Click to expand it.
......@@ -10,7 +10,12 @@ def get_matches(query, choices, limit=3):
return result
def basicinform(input):
<<<<<<< HEAD
stocks = pd.read_csv('stockcodename.csv', index_col=0)
=======
stocks = pd.read_csv('stockcodename.csv', names=['Symbol', 'Market', 'Name'
, 'Sector', 'Industry', 'ListingDate', 'SettleMonth', 'Represetitive', 'HomePage', 'Region'], index_col=0)
>>>>>>> f1c2d34f3272bc7cfebf6e887b72493185c4c57c
symbol = ''
for i in enumerate(stocks.Name):
......@@ -23,8 +28,8 @@ def basicinform(input):
cand = ''
for i in fuzzy:
cand += i[0]
cand += " "
cand += "중 찾는게 있으신가요? \n다시 입력해주세요."
cand += "\n"
cand += "중 찾는게 있으신가요? 다시 입력해주세요."
return cand
df = fdr.DataReader(symbol)
......@@ -33,13 +38,22 @@ def basicinform(input):
price = df.Close.iloc[-1]
ror = ror_df[-1]
value = {
"현재가": price,
"거래랑": volume,
"전일 대비 수익률:": ror
}
ror = round(ror, 4)
ror = ror * 100
value = ''
value = "1현재가: " + str(price) + "원\n거래랑: " + str(volume) + "건\n전일대비: " + str(ror) + "%"
# value = {
# "현재가": price,
# "거래랑": volume,
# "전일 대비 수익률:": ror
# }
return value
<<<<<<< HEAD
=======
# print(basicinform('호텔신라'))
>>>>>>> f1c2d34f3272bc7cfebf6e887b72493185c4c57c
args = sys.argv
print(basicinform(args[0]))
......
This diff is collapsed. Click to expand it.