Skip to content

Commit 6ad9a17

Browse files
author
mole
committed
pandas 2.0 read_csv(), use date_format instead date_parser
1 parent 99ab9a5 commit 6ad9a17

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

SkinokBacktraderUI.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,18 @@ def loadData(self, dataPath, datetimeFormat, separator):
112112

113113
# Python contains
114114
if not dataPath in self.dataframes:
115+
# self.dataframes[fileName] = pd.read_csv(dataPath,
116+
# sep=separator,
117+
# parse_dates=[0],
118+
# date_parser=lambda x: pd.to_datetime(x, format=datetimeFormat),
119+
# skiprows=0,
120+
# header=0,
121+
# names=["Time", "Open", "High", "Low", "Close", "Volume"],
122+
# index_col=0)
115123
self.dataframes[fileName] = pd.read_csv(dataPath,
116124
sep=separator,
117125
parse_dates=[0],
118-
date_parser=lambda x: pd.to_datetime(x, format=datetimeFormat),
126+
date_format=datetimeFormat,
119127
skiprows=0,
120128
header=0,
121129
names=["Time", "Open", "High", "Low", "Close", "Volume"],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy