Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Create a Grouped Bar Chart | Bar Charts
Visualization in Python with matplotlib
course content

Зміст курсу

Visualization in Python with matplotlib

Visualization in Python with matplotlib

1. Basics: Line Charts
2. Bar Charts
3. Scatter Plots

Create a Grouped Bar Chart

Note

To build 2 columns, we need to set x - width/2 as the first parameter with the first .bar() call, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 6
toggle bottom row

Create a Grouped Bar Chart

Note

To build 2 columns, we need to set x - width/2 as the first parameter with the first .bar() call, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 6
toggle bottom row

Create a Grouped Bar Chart

Note

To build 2 columns, we need to set x - width/2 as the first parameter with the first .bar() call, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Note

To build 2 columns, we need to set x - width/2 as the first parameter with the first .bar() call, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Завдання

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 2. Розділ 6
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt