In chapter 8, I introduced you to working with data frames, using sample data loaded from a CSV file. In this chapter, I’ll show you more ways to convert values of different types to and from a DataFrame object. You need to have this fundamental knowledge so you can use the DataFrames.jl package efficiently. You must be prepared for source data to come in various formats, and you need to know how to convert that data to a DataFrame.
Since the topic of creating DataFrame objects is broad, in this chapter, I use several small tasks as examples of applying the concepts you learn. Following one complex example (as we did with the Lichess puzzle data in chapters 8 and 9) would not allow me to show all the options that are useful in practice. To ensure that this chapter, apart from teaching you how to create data frames, also gives you useful recipes for data analysis, we will create a plot of a correlation matrix of data stored in a data frame.