Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Holt Winters Forecasting - IndexError
Post: Holt Winters Forecasting - IndexError

Hi All, I'm currently working on a Holt Winters forecast, however i'm experiencing difficulty in enforcing the trend component I believe? When I try running the script, I receive the message "IndexEr...
Ronnie General Coding Help 0 1,554 Mar-07-2019, 01:02 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 04:44 PM)heiner55 Wrote: Your program is not the same as mine. Paste my sample and run it. #!/usr/bin/python3 import re   pattern = r"""     tel:       # tel:     \s*?       # maybe s...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 05:01 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 04:01 PM)heiner55 Wrote: My sample runs with Python 3.6 (not with Python 2.7). Uninstall your Python 2.7 and install Python 3.6: https://www.python.org/ftp/python/3.6.3/...-3.6.3.exe ...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 04:33 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 03:48 PM)heiner55 Wrote: Then remove sep=''': print("Line ", linenr, ": ", match[1]) I tried doing this earlier but received the following : >>> with open ('phone_log.txt') ...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 03:50 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 03:35 PM)heiner55 Wrote: print("Line ", linenr, ": ", match[1], sep='') I typed the following and received the "SyntaxError: invalid syntax", with the '=' sign highlighted in red in th...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 03:43 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 03:35 PM)heiner55 Wrote: print("Line ", linenr, ": ", match[1], sep='') Do I type this in the Python Shell?
Ronnie General Coding Help 18 7,856 Oct-27-2017, 03:37 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 02:28 PM)heiner55 Wrote: Maybe this helps: https://docs.python.org/3.6/library/re.html #!/usr/bin/python3 import re   pattern = r'''     tel:       # tel:     \s*?       # maybe some ...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 03:32 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-27-2017, 01:53 PM)heiner55 Wrote: That is ok. Ok that's great, so my code is the following: >>> data_file = open("phone_log.txt", "r") >>> data = data_file.readlines() >&g...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 02:05 PM
    Thread: Extracting numbers
Post: RE: Extracting numbers

(Oct-26-2017, 04:14 PM)heiner55 Wrote: Maybe this will help: #!/usr/bin/python3 import re pattern = re.compile(r'''     tel:           # tel:     \s*?           # maybe some spaces     \+44       ...
Ronnie General Coding Help 18 7,856 Oct-27-2017, 01:46 PM
    Thread: Extracting numbers
Post: Extracting numbers

Hello, I am wondering if anyone can help me with my computing code, I have a text file and need to extract the UK phone numbers, and ensure that the phone numbers have a prefix of +44 and are followed...
Ronnie General Coding Help 18 7,856 Oct-26-2017, 02:49 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020