Untitled

From Edgy Cassowary, 2 Months ago, written in Plain Text, viewed 74 times.
URL http://codebin.org/view/06567cf1 Embed
Download Paste or View Raw
  1. import pandas as pd
  2. df = pd.DataFrame({
  3. 'a': [100, 100, 100, 200, 200],
  4. 'c': ['first_group','first_group','second_group','second_group','second_group']
  5. })
  6.  
  7. grouped_df = df.groupby('c')
  8. for name, data in grouped_df:
  9.   print("Имя группы после группировки:\n", name)
  10.   print("Данные после группировки \n", data)
  11.   print("")

Replies to Untitled rss

Title Name Language When
Re: Untitled Wet Tern text 2 Months ago.

Reply to "Untitled"

Here you can reply to the paste above