Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Develop successful mentoring programs. page 418

Answered: 1 week ago