Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is wrong with my Python code? I want it to search 2 columns BIT_return and TSX_return where it is
What is wrong with my Python code?
I want it to search 2 columns "BIT_return" and "TSX_return" where it is <=-0.02, in the excel data file called "excel_data". I need to use loc function because I want to compute the percentage of change.
CODE:
CaseA = excel_data[ 'BIT_return', 'TSX_return' ].loc [ ( excel_data [ ' BIT_return ',' TSX_return' ] <=-0.02 ) ] excel_data['Return_A']=excel_data['CaseA'].pct_change()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started