Advertisement
Vitaliy_Novichikhin

9.10.2.5/5 Pandas для анализа данных

Mar 6th, 2022
2,264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. board_df = pd.read_csv('game_board.csv')
  4.  
  5. #print(board_df[6:9]['H']) - с 6 по 8 строки выходят
  6. #print(board_df[6:9, 'H']) - Cокращенная запись,
  7. # Но ошибка TypeError: '(slice(6, 9, None), 'H')' is an invalid key
  8. #print(board_df.loc[6:9, 'H']) - ВЕРНЫЙ вывод, но нужно сокращенной записью
  9. #print(board_df[board_df[:, 'H'] == 1])
  10. print(board_df[board_df[:,'H'] == 1]) # TypeError: '(slice(None, None, None), 'H')' is an invalid key
  11. # напишите ваш код здесь
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement