Browse files

use string partition instead of split to improve

efficiency
  • Loading branch information...
1 parent 742fd3d commit dab3dd0e3ebf50d713a1092e9cae37799395b5e9 Sal Uryasev committed Oct 21, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 pyGTrends.py
View
2 pyGTrends.py
@@ -94,7 +94,7 @@ def csv(self, section="main", as_list=False):
segments = self.raw_data.split('\n\n\n')
for s in segments:
- if s.split(',')[0] in section:
+ if s.partition(',')[0] in section:
if as_list:
return [line for line in csv.reader(s.split('\n'))]
else:

0 comments on commit dab3dd0

Please sign in to comment.