Re: [Tutor] Iteration issues

2018-05-11 Thread Albert-Jan Roskam
Op 11 mei 2018 21:43 schreef Neil Cerutti : On 2018-05-10, Albert-Jan Roskam wrote: > If a punctuation symbol is in your string: Replace that symbol > with an empty string. > >=>>> maybe something like > > import re > no_interpunction = re.sub("[%s]" % re.escape(string.punctuation), '', > sen

Re: [Tutor] ImportError: No module named openpyxl.workbook

2018-05-11 Thread Alan Gauld via Tutor
On 11/05/18 01:43, Pareshkumar Panchal wrote: > Error: > from openpyxl.workbook import Workbook > ImportError: No module named openpyxl.workbook > > I am using only pandas however it still works fine on one computer having > openpyxl already installed eventhough i am not using openpyxl in the > p

Re: [Tutor] Question about a python finction

2018-05-11 Thread David Rock
> On May 9, 2018, at 07:14, kevin hulshof wrote: > > Hello, > > Is there a function that allows you to grab the numbers between two numbers? > > Eg. If you input the numbers 1 and 4 > To make a list like this [1,2,3,4] One option is range range(1,5) >>> range(1,5) [1, 2, 3, 4] https://docs

Re: [Tutor] Question about a python finction

2018-05-11 Thread Mark Lawrence
On 09/05/18 13:14, kevin hulshof wrote: Hello, Is there a function that allows you to grab the numbers between two numbers? Eg. If you input the numbers 1 and 4 To make a list like this [1,2,3,4] Thank you for you’re time Seems like 'range' should fit your needs https://docs.python.org/3/

[Tutor] Question about a python finction

2018-05-11 Thread kevin hulshof
Hello, Is there a function that allows you to grab the numbers between two numbers? Eg. If you input the numbers 1 and 4 To make a list like this [1,2,3,4] Thank you for you’re time Sent from my iPhone ___ Tutor maillist - Tutor@python.org To unsub

[Tutor] ImportError: No module named openpyxl.workbook

2018-05-11 Thread Pareshkumar Panchal
Hi, I am trying to write the pandas dataframe to excel but it shows following error: Error: from openpyxl.workbook import Workbook ImportError: No module named openpyxl.workbook I am using only pandas however it still works fine on one computer having openpyxl already installed eventhough i am n

Re: [Tutor] Iteration issues

2018-05-11 Thread Neil Cerutti
On 2018-05-10, Albert-Jan Roskam wrote: > If a punctuation symbol is in your string: Replace that symbol > with an empty string. > >=>>> maybe something like > > import re > no_interpunction = re.sub("[%s]" % re.escape(string.punctuation), '', > sentence) str.translate can be used instead of re