Advertisement
maxim_shlyahtin

123

May 18th, 2023
1,040
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import pandas as pd
  2. import numpy as np
  3.  
  4. path_right = r"C:\Users\Max-13700kf\PycharmProjects\pythonProject\ex.csv"
  5. path_left = r"path to elagin left"
  6.  
  7. elagin_right_df = pd.read_csv(path_right)
  8. # elagin_left_df = pd.read_csv(path_left)
  9.  
  10. # 1
  11. print(elagin_right_df.head())
  12.  
  13. # 2
  14. print(elagin_right_df.isnull().sum(), elagin_right_df.info, sep='\n')
  15.  
  16.  
  17. #3
  18. print(elagin_right_df.duplicated())
  19.  
  20. #4
  21. print(elagin_right_df.n)
  22.  
  23. #5
  24. elagin_right_df['education'] = None
  25. elagin_right_df['age'] = None
  26. print(elagin_right_df.sort_values(['education', 'age'], ascending=[False, False]).head(20))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement