MOST USED FUNCTIONS IN PANDAS

 MOST USED FUNCTIONS IN  PANDAS 

read_csv(): reads a CSV file into a DataFrame.
  1. read_excel(): reads an Excel file into a DataFrame.
  2. read_sql(): reads a SQL query or database table into a DataFrame.
  3. read_json(): reads a JSON file into a DataFrame.
  4. read_html(): reads an HTML file or URL into a list of DataFrames.
  5. read_stata(): reads a Stata file into a DataFrame.
  6. read_clipboard(): reads text from the clipboard into a DataFrame.
  7. read_pickle(): reads a pickled object into a DataFrame.
  8. read_feather(): reads a Feather file into a DataFrame.
  9. read_parquet(): reads a Parquet file into a DataFrame.
  10. read_hdf(): reads an HDF5 file into a DataFrame.
  11. DataFrame(): creates a new DataFrame object.
  12. Series(): creates a new Series object.
  13. concat(): concatenates two or more DataFrames.
  14. merge(): merges two DataFrames based on a common column.
  15. append(): appends rows to a DataFrame.
  16. pivot_table(): creates a pivot table from a DataFrame.
  17. groupby(): groups data by one or more columns.
  18. apply(): applies a function to each element of a DataFrame or Series.
  19. transform(): applies a function to each group in a groupby object.
  20. agg(): aggregates data in a groupby object.
  21. rolling(): calculates a rolling window function on a DataFrame or Series.
  22. resample(): resamples a time-series DataFrame.
  23. mean(): calculates the mean of a DataFrame or Series.
  24. median(): calculates the median of a DataFrame or Series.
  25. mode(): calculates the mode of a DataFrame or Series.
  26. min(): calculates the minimum of a DataFrame or Series.
  27. max(): calculates the maximum of a DataFrame or Series.
  28. std(): calculates the standard deviation of a DataFrame or Series.
  29. sum(): calculates the sum of a DataFrame or Series.
  30. abs(): calculates the absolute value of a DataFrame or Series.
  31. round(): rounds the values of a DataFrame or Series.
  32. clip(): clips the values of a DataFrame or Series.
  33. isna(): returns a boolean mask indicating missing values.
  34. notna(): returns a boolean mask indicating non-missing values.
  35. dropna(): drops missing values from a DataFrame or Series.
  36. fillna(): fills missing values in a DataFrame or Series.
  37. replace(): replaces values in a DataFrame or Series.
  38. map(): maps values in a Series to new values.
  39. applymap(): applies a function to each element of a DataFrame.
  40. select_dtypes(): selects columns based on their data type.
  41. loc(): accesses a group of rows and columns by label.
  42. iloc(): accesses a group of rows and columns by integer position.
  43. at(): accesses a single value by label.
  44. iat(): accesses a single value by integer position.
  45. query(): selects rows based on a boolean expression.
  46. sort_values(): sorts a DataFrame by one or more columns.
  47. sort_index(): sorts a DataFrame by its index.
  48. nlargest(): returns the n largest values in a DataFrame or Series.
  49. nsmallest(): returns the n smallest values in a DataFrame or Series.
  50. pivot(): reshapes a DataFrame from long to wide format.
  51. melt(): reshapes a DataFrame from wide to long format.
  52. explode(): returns a new DataFrame with each element of a column in a new row.
  53. reset_index(): resets the index of a DataFrame to a RangeIndex.
  54. set_index(): sets the index of a DataFrame to a specified column.
  55. rename(): renames columns or index labels of a DataFrame.
  56. drop(): drops rows or columns from a DataFrame.
  57. drop_duplicates(): removes duplicate rows from a DataFrame.
  58. duplicated(): returns a boolean mask indicating duplicate rows.
  59. merge_ordered(): merges two DataFrames and sorts the result.
  60. merge_asof(): merges two DataFrames based on nearest match.
  61. interpolate(): fills missing values in a DataFrame using interpolation.
  62. diff(): calculates the difference between consecutive values in a DataFrame or Series.
  63. pct_change(): calculates the percentage change between consecutive values in a DataFrame or Series.
  64. cumsum(): calculates the cumulative sum of a DataFrame or Series.
  65. cumprod(): calculates the cumulative product of a DataFrame or Series.
  66. cummin(): calculates the cumulative minimum of a DataFrame or Series.
  67. cummax(): calculates the cumulative maximum of a DataFrame or Series.
  68. shift(): shifts the values of a DataFrame or Series by a specified number of periods.
  69. fillna(): fills missing values in a DataFrame or Series.

Comments

Popular posts from this blog

Heatmaps

Data Visualization