From the course: Complete Guide to Generative AI for Data Analysis and Data Science

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solution: Distribution of data

Solution: Distribution of data

(upbeat music) - [Instructor] Let's look at the solution to our challenge around distribution of data. So, I'm going to paste in a prompt here, which says to create a 100 product prices in the range of $5 to $10. Now, explicitly state the data should be normally distributed. There's a good chance that ChatGPT would come up with a normal distribution, but I want to state it explicitly, because that was part of the challenge. Also, I want to indicate that I want to have two decimal places and this is because I'm dealing with currency of US dollars, and so, working with two decimal places makes sense. ChatGPT wouldn't necessarily round the values that it randomly generates to two decimal places, so I wanted to make sure that was explicitly stated. And then, finally, I state to create a visualization to display the distribution. So, I'm going to execute the prompt, and let's review the contents of the code. So, the first thing, of course, is we have our two imports. So, we're going to…

Contents