« first day (1839 days earlier)      last day (1527 days later) » 

 
2 hours later…
6:44 AM
I wish to know the order of evaluation of the following statement. Any links to article on this topic will be helpful.. if 'some_value' + str(namedtuple.field).lower() in str(namedtuple.another_field).lower():
 
7:12 AM
namedtuple.field, namedtuple.another_field, first str(), first lower(), second str(), second lower(), +, in
 
That link suggests that if has greater precedence than +. So I got confused
My example has got: if 'some_value' + .......
So I thought IF will evaluate first
 
the order of that list is from low to high
 
thankyou
 
no problem
 
It is a problem
10 messages moved from Python
1 message moved from Python
 
 
7 hours later…
2:04 PM
HI, I am getting "Method 'value' has no 'lower' member (no-member)" when I use pylint on my code. Can you advise me the correct approach to use lower on named tuple attribute. Am I right or do I need to enclose it in str(...) before using lower()?
import collections
nt_rec = collections.namedtuple('Rec', ['rec_name', 'rec_type'])
rec1 = nt_rec('rec1','test')
a.rec_name.lower() # or should I do str(a.rec_name).lower()
 
a? What's a?
 
sorry _/\_ it is -> rec1.rec_name.lower() # or should I do str(rec1.rec_name).lower()
 
Using rec1.rec_name.lower() rather than a.rec_name.lower() works fine.
Given the C&P issue, are you sure what you've provided is what you're actually doing?
 
It works file with rec1.rec_name.lower() but when I use pylint, it gives me msg as "Method 'value' has no 'lower' member (no-member)"
 
Use the typing version, or use str like you suggested
 
2:43 PM
8 messages moved from Python
 
 
3 hours later…
5:34 PM
When we use pop on a dictionary, and dont make an assignment, what happens to the popped value?
 
1 message moved from Python
 
6:01 PM
-3
Q: How to dynamically read and convert excel in pyspark python

jackson smithi have the following file format in excel I am trying to achieve like this The first row 1 will became the dataframe date and its value value become the value; and remaining part the operation became the data frame and rest this will became the value and the date-time ; will kept only tim...

 
1 message moved from Python
 

« first day (1839 days earlier)      last day (1527 days later) »