Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박하늘
/
stock_chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박하늘
2021-05-25 23:18:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c2f1ba82a6335e593f86e197bcff27fa38671a7e
c2f1ba82
1 parent
b4a296f7
stockdata.py : clarify code
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
pyfiles/stockdata.py
pyfiles/stockdata.py
View file @
c2f1ba8
import
FinanceDataReader
as
fdr
import
numpy
as
np
import
pandas
as
pd
def
basicinform
(
input
):
stocks
=
pd
.
read_csv
(
'stockcodename.csv'
,
index_col
=
0
)
stocks
=
pd
.
read_csv
(
'stockcodename.csv'
,
index_col
=
0
)
symbol
=
''
for
i
in
enumerate
(
stocks
.
Name
)
:
for
i
in
enumerate
(
stocks
.
Name
):
if
i
[
1
]
==
input
:
symbol
=
(
stocks
.
iloc
[
i
[
0
]]
.
Symbol
)
break
...
...
@@ -16,8 +16,9 @@ def basicinform(input):
price
=
df
.
Close
.
iloc
[
-
1
]
ror
=
ror_df
[
-
1
]
value
=
{
"현재가"
:
price
,
"거래랑"
:
volume
,
"전일 대비 수익률:"
:
ror
value
=
{
"현재가"
:
price
,
"거래랑"
:
volume
,
"전일 대비 수익률:"
:
ror
}
return
value
return
value
...
...
Please
register
or
login
to post a comment