Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use string partition instead of split to improve

efficiency
  • Loading branch information...
commit dab3dd0e3ebf50d713a1092e9cae37799395b5e9 1 parent 742fd3d
Sal Uryasev authored
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:
Please sign in to comment.
Something went wrong with that request. Please try again.