0

Suppose I have something stored in variable x and now i want to import some datasets and assign name- A_x to the first data, B_x to the second dataset and so on.. Say x = customer So I want datasets to be saved as A_customer, B_customer and so on. How can I do this in python 3.0

2
  • Maybe use a dictionary so you can save the objects by unique names Commented Apr 5, 2020 at 11:55
  • 1
    As this answer mentions "Creating variables with dynamic names is typically a bad practice. I think the best solution for your problem is to store your dataframes into a dictionary and dynamically generate the name of the key to access each dataframe." Commented Apr 5, 2020 at 11:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.