ComenzarEmpieza gratis

Refining a parallel coordinates plot

After viewing your parallel coordinates plot, the founder concludes that her decision to step away from a Batman-centered streaming platform may have been premature. Indeed, the parallel coordinates plot seems to suggest that many popular movies are strongly associated with The Dark Knight. She decides instead to pitch the idea to her staff in a meeting, but has asked you to make some refinements to the plot to make it more visually appealing for the presentation.

Note that the rules have been generated and are available for you as rules. Additionally, pandas is available as pd and the function rules_to_coordinates() has been defined and is available.

Este ejercicio forma parte del curso

Market Basket Analysis in Python

Ver curso

Instrucciones del ejercicio

  • Import the parallel coordinates function from the plotting submodule of pandas.
  • Convert the DataFrame of rules into coordinates.
  • Complete the statement to generate a parallel coordinates plot, using ocean as the colormap.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Import the parallel coordinates plot submodule
from pandas.____ import parallel_coordinates

# Convert rules into coordinates suitable for use in a parallel coordinates plot
coords = ____

# Generate parallel coordinates plot
____(____, 'rule', colormap = '____')
plt.legend([])
plt.show()
Editar y ejecutar código