Find Jobs
Hire Freelancers

Accessing an object using eval in python

$10-30 USD

Closed
Posted 6 months ago

$10-30 USD

Paid on delivery
How can I get the code below to print obj2's variable (i.e., the data frame, df) using the eval function? The sample code is as follows: ________________________________________________________ import pandas as pd class Sample: def __init__(self): [login to view URL] = [login to view URL]({'num_legs': [2, 4, 8, 0], 'num_wings': [2, 0, 0, 0], 'num_specimen_seen': [10, 2, 1, 8]}, index=['falcon', 'dog', 'spider', 'fish']) def print(self): eval("[login to view URL]()") def main(): obj1 = Sample() obj2 = Sample() [login to view URL]() if __name__ == '__main__': main() ________________________________________________________ When I try running the program, it throws the following error: NameError: name 'obj2' is not defined I need to access the df variable belonging to obj2 using the eval [login to view URL] stick to providing a solution ONLY using the eval() function and NOT using the getattr() function. I have attached the code along with this project. Please refer to [login to view URL]
Project ID: 37468416

About the project

23 proposals
Remote project
Active 5 mos ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
23 freelancers are bidding on average $24 USD for this job
User Avatar
Greetings! How are you today? Thanks for posting this job. I have checked your project description. ✅I'm AI engineer also Developer with 7+ years experiment. ✅I am very familiar to Deep Learning. Contact me with all the details and requirements for your project for further discussion. I will provide you dedicated support and follow-up. Best wishes, KuroKien
$15 USD in 1 day
4.9 (212 reviews)
6.5
6.5
User Avatar
Hi there, I checked your requirements and guarantee you that i have relevant experience in Python it's gonna be done within the next few hours . Let's contact via chat so that I can start work immediately
$40 USD in 7 days
4.8 (26 reviews)
5.2
5.2
User Avatar
I saw your project description carefully. I can complete this task with high quality on time. My core skill is Data processing and ML/DL that train the model from your data. After that i will predict future value base on trained model. I have full experiences in this work. Please sned me your message to discuss your project detail more...I am waiting your reply now. Thanks.
$20 USD in 1 day
4.7 (12 reviews)
5.1
5.1
User Avatar
Hi Sir, I have fixed locally please message me here.I can give you the output file. Looking forward.
$30 USD in 1 day
4.9 (32 reviews)
4.4
4.4
User Avatar
Hi there, my name is Ram and I'm a Python developer with 8+ years of software development experience. I understand that you're looking for a way to get the code below to print obj2's variable (i.e., the data frame, df) using the eval function.
$20 USD in 7 days
5.0 (9 reviews)
4.4
4.4
User Avatar
Hi there! My name is Sufyan and I am an experienced software engineer and AI developer with a strong track record of delivering cutting-edge solutions across diverse domains. I understand that you are looking for a way to access an object using eval in Python that would print the variable belonging to obj2 using the eval function. Specifically, you need this code to work: I would be more than happy to help you with your project! With my expertise in Python and related technologies such as neural networks, I am confident that I can provide the best solution for your needs. Please let me know if you have any questions or would like me to further clarify anything regarding my proposal for this job.
$30 USD in 7 days
5.0 (2 reviews)
3.3
3.3
User Avatar
Hi, I have found the solution to print df belonging to obj2 using eval function. Contact me, I will be waiting for your response. Thanks!
$20 USD in 1 day
5.0 (4 reviews)
2.9
2.9
User Avatar
Hi there! I have gone through your job details and understood them. I can help you get the code below to print obj2's variable (i.e., the data frame, df) using the eval function. I'd completed my graduation and post-graduation in Statistics. Data Wrangling, Data Analysis, Hypothesis testing, Probability, probability distribution, etc. are my favorite topics. I've 8 years of experience in the field of FULL STACK WEB DEVELOPMENT with PHP, Python, Django, MySQL, JavaScript, JQuery, Vuejs, React, Codeigniter, Laravel, etc. Eagerly waiting for your response and am ready to start working instantly. Regards
$30 USD in 1 day
5.0 (3 reviews)
2.6
2.6
User Avatar
Hello, I have already fixed your problem. If you want a quick solution, please contact me at any time.
$10 USD in 1 day
5.0 (2 reviews)
1.5
1.5
User Avatar
Hey there, I have been working and studying python since last one and a half year, so this gives me a fair share of experience in this. The code that you have provided me with has the error that is fairly simple. I will be able to fix it. Don't worry about it and leave this work to me.
$13 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hey there, I have extensive knowledge of Python,flask,django,docker and other cloud technologies including bash scripts. This problem seems interesting, I would like to give it a shot. I can help you with that. Let's have a chat on this. Thanks!.
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of INDIA
Mumbai, India
5.0
21
Payment method verified
Member since Sep 16, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.