![](https://thecoderscatnip.com/wp-content/uploads/2024/02/practical-statistics-for-data-scientists.png?w=689)
Important Pandas Operations
Basics & I/O:
- pd.read_csv(filename): Read a comma-separated values file.
- pd.read_excel(filename): Read an Excel file.
- pd.read_sql(query, connection): Read from an SQL table/database
- df.to_csv(filename): Write to a CSV file.
- df.to_excel(filename): Write to an Excel file.
- df.head(n): Displays the first n rows.
- df.tail(n): Displays the last n rows.
- df.describe(): Summary statistics.
Data Creation:
- pd.DataFrame(data): Create a DataFrame.
- pd.Series(data): Create a Series.
Selection:
- df[col]: Select column by column name.
- df[[col1, col2]]: Select multiple columns.