In Pandas, I want to pull Opportunity data with CreatedDate >= 1/1/2015.
Currently, I am extracting all Opportunity data before filtering for CreatedDate. Is it possible to optimize this process by adding the CreatedDate condition to the query?
Current State:
query_result = service.query("SELECT ID, CreatedDate FROM Opportunity")
records = query_result['records']
oppty = pd.DataFrame(records)
oppty = oppty[(oppty['CreatedDate'] >= '2015-01-01')]