Advertisement
rajath_pai

describe & concat

Mar 1st, 2021
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. import pandas as pd  
  2.    
  3. s = pd.Series([1,2,3])
  4. t = pd.Series([4,5,6])
  5. p = s.describe()
  6. print(p,"\n__________________")
  7.  
  8. s1 = pd.Series(['a', 'b'])
  9. s2 = pd.Series(['c', 'd'])
  10. s1 = pd.concat([s1, s2])
  11.  
  12. print(s1)
  13.  
  14. """
  15. OUTPUT
  16.  
  17. count    3.0
  18. mean     2.0
  19. std      1.0
  20. min      1.0
  21. 25%      1.5
  22. 50%      2.0
  23. 75%      2.5
  24. max      3.0
  25. dtype: float64
  26. __________________
  27. 0    a
  28. 1    b
  29. 0    c
  30. 1    d
  31. dtype: object
  32.  
  33.  
  34. """
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement