Advertisement
elena1234

describe and display data set with Pandas

Feb 10th, 2023 (edited)
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | Source Code | 0 0
  1. import pandas as pd
  2. import matplotlib.pyplot as plt
  3. import numpy as np
  4. pd.options.display.max_columns = 30
  5. pd.options.display.float_format = '{:.2f}'.format
  6.  
  7. df.describe(include = 'object')
  8. df.describe()
  9. df.info()
  10.  
  11. sns.pairplot(df, hue = 'test_result')
  12. plt.show()
  13.  
  14. plt.figure()
  15. sns.pairplot(df[['age','trestbps', 'chol','thalach','target']], hue = "target", markers=["o", "s"])
  16. plt.show()
  17.  
  18. df.hist(figsize = (20,12), bins = 100)
  19. plt.show()
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement