Loading...
Searching...
No Matches
Go to the documentation of this file.
5 def date(self, filename):
6 """Sets date column given the filename (it contains the date)
7 For example gyrostream-pty-ltd_iheart_202203_Monthly-Sales_(1).txt
9 filename (str): current filename
10 Returns: date_str (str)
12 date = re.findall(
r'_\d{6}_', filename)[0]
13 date = date.replace(
"_",
"")
14 date_str = date[:4]+
"-"+date[4:]+
"-01"