Pandas

For Data Analysis

Most Used Pandas Function:

  1. read_csv(): Reads a CSV file into a pandas DataFrame.

  2. head(): Returns the first n rows of a DataFrame.

  3. info(): Provides a concise summary of a DataFrame including its data types and memory usage.

  4. describe(): Generates descriptive statistics of the DataFrame's numerical columns.

  5. shape: Returns a tuple representing the dimensionality of the DataFrame.

  6. isnull(): Detects missing values in the DataFrame.

  7. dropna(): Drops rows with missing values from the DataFrame.

  8. fillna(): Fills missing values in the DataFrame with specified values.

  9. groupby(): Groups the DataFrame using specified columns and applies aggregate functions.

  10. merge(): Merges two DataFrames based on a common column.

  11. pivot_table(): Creates a spreadsheet-style pivot table as a DataFrame.

  12. apply(): Applies a function along any axis of the DataFrame.

  13. plot(): Generates various plots like line, bar, scatter, etc., based on the data.

  14. to_csv(): Writes the DataFrame to a CSV file.

  15. corr(): Computes pairwise correlation of columns, excluding NA/null values.

  16. loc[]: Accesses a group of rows and columns by labels or a boolean array.

  17. iloc[]: Accesses group of rows and columns by integer position.