Facebook
From Denim Duck, 2 Years ago, written in Python.
This paste is a reply to Untitled from Cream Panda - view diff
Embed
Download Paste or View Raw
Hits: 158
  1. # Import your libraries
  2. import pandas as pd
  3. # Start writing code
  4. result = (pd.pivot_table(airbnb_search_details,
  5.                index=['city', 'property_type'],
  6.                values=['bathrooms', 'bedrooms'])).reset_index()
  7. #reset_index() сбросить заголовки на один уровень, иначе не примает решение