Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I have a problem with last step of my Python code. It seems like static function I applied cannot call global variables of df_an

Hello,

I have a problem with last step of my Python code. It seems like static function I applied cannot call global variables of df_an and df_b. When I try to just try functions, it works, but I really want to keep it in a class structure. I am trying to call global df_a and df_b but id doesn't work :(

My data:

image text in transcribed

image text in transcribed

My function code:

image text in transcribed

And this is an error I get when I try to test my program:

image text in transcribed

image text in transcribed

Please, help me to fix this problem, I will leave upvote for an answer! TIA

Departure Time Journey Duration Price Arrival Departure \begin{tabular}{lrrrr} \hline Seoul (ICN) - Warsaw (WAW) & 9:30am10:10pm & 20h 40m (1 stop) & 848 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 9:30am12:10pm & 34h40m (1 stop) & 850 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 8:50am2:25pm & 13h35m (Nonstop) & 910 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 10:45am10:00pm & 19h15m (1 stop) & 987 \\ & & & 34h20m (1 stop) & 989 \end{tabular} Departure Time Journey Duration Price Arrival Departure \begin{tabular}{llll} \hline Warsaw (WAW) - Seoul (ICN) & 6:20pm10:55am & 32h 35m (1 stop) & 478 \\ Warsaw (WAW) - Seoul (ICN) & 1:00pm12:15pm & 15h15m (1 stop) & 485 \\ Warsaw (WAW) - Seoul (ICN) & 8:55am12:15pm & 19h20m (1 stop) & 485 \\ Warsaw (WAW) - Seoul (ICN) & 1:25pm11:25am & 14h0m (1 stop) & 494 \\ Warsaw (WAW) - Seoul (ICN) & 6:55am11:25am & 20h 30m (1 stop) & 494 \end{tabular} Do you prefer the cheapest(A) or the Fastest(B) flight? Write A or B.a

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

What is the purpose of a bank statement?

Answered: 1 week ago