https://github.com/kernel-loophole/data-analysis-with-pandas
pandas
https://github.com/kernel-loophole/data-analysis-with-pandas
data-science dataset numpy pandas python
Last synced: 11 months ago
JSON representation
pandas
- Host: GitHub
- URL: https://github.com/kernel-loophole/data-analysis-with-pandas
- Owner: kernel-loophole
- Created: 2022-03-31T15:38:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T20:37:41.000Z (almost 3 years ago)
- Last Synced: 2025-01-24T10:46:48.880Z (about 1 year ago)
- Topics: data-science, dataset, numpy, pandas, python
- Language: Jupyter Notebook
- Homepage:
- Size: 13.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pandas
pandas
# Create DataFrame and series
# make it simple
```python
import pandas as pd
data_frame=pd.DataFrame({
"Name":["ali","zain","junaid"],
"age":[20,15,15],
"sex":["male","male","male"]
})
```
# Load csv or Excel file
```python
def read_from_csv(filename):
with open (filename) as f:
dataset=pd.read_csv(f)
# print(dataset.head(20))
# print(dataset.dtypes)
return dataset
dataset=read_from_csv("cities.csv")
dataset
```
# Locks
```python
student_data.loc[student_data["First name"].str.len().idxmax(),"First name"]
```
# Modin for parallel computing
# Modin uses Ray or Dask to provide an effortless way to speed up your pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame libraries, Modin provides seamless integration and compatibility with existing pandas code. Even using the DataFrame constructor is identical.
```python
import modin.pandas as pd
import numpy as np
data_frame=pd.read_csv("Airbnb_Open_Data.csv")
```