Skip to Main Content
The Data Visualization Workshop
book

The Data Visualization Workshop

by Mario Döbler, Tim Großmann, Rohan Chikorde, Joshua Görner, Anshu Kumar, Piotr Malak, Ankit Verma
July 2020
Beginner to intermediate content levelBeginner to intermediate
536 pages
8h 47m
English
Packt Publishing
Content preview from The Data Visualization Workshop

Appendix

1. The Importance of Data Visualization and Data Exploration

Activity 1.01: Using NumPy to Compute the Mean, Median, Variance, and Standard Deviation of a Dataset

Solution:

  1. Import NumPy:

    import numpy as np

  2. Load the normal_distribution.csv dataset by using the genfromtxt method from NumPy:

    dataset = np.genfromtxt('../../Datasets/normal_distribution.csv', \

                            delimiter=',')

  3. First, print a subset of the first two rows of the dataset:

    dataset[0:2]

    The output of the preceding code is as follows:

    Figure 1.57: First two rows of the dataset

    Figure 1.57: First two rows of the dataset

  4. Load the dataset and calculate the mean of the third row. Access the third row by using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Data Visualization

Hands-On Data Visualization

Jack Dougherty, Ilya Ilyankou
The Data Wrangling Workshop - Second Edition

The Data Wrangling Workshop - Second Edition

Brian Lipp, Shubhadeep Roychowdhury, Dr. Tirthajyoti Sarkar, John Wesley Doyle, Harshil Jain, Robert Thas John, Akshay Khare, Nagendra Nagaraj, Samik Sen, Dr. Vlad Sebastian Ionescu
Big Data Visualization

Big Data Visualization

James D. Miller

Publisher Resources

ISBN: 9781800568846Supplemental Content