Skip to content

Commit 30f2a04

Browse files
committed
Pandas Notes added
1 parent cb7d54c commit 30f2a04

2 files changed

Lines changed: 25 additions & 17 deletions

File tree

Packages/Pandas/Write data.md

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
### Overview
1+
---
2+
title: Pandas
3+
parent: Packages
4+
---
5+
6+
# Read Data
27
- all data on pandas are basically of two types
38
- dataframe (2d data/table), series (1d data/list)
49

@@ -23,3 +28,22 @@ print(f"Min Temp:{temperatureSeries.min()}")
2328
print(f"Max Temp:{temperatureSeries.max()}")
2429
print(f"Mean Temp:{temperatureSeries.mean()}")
2530
```
31+
32+
# Write Data
33+
34+
### create new csv file from data
35+
```python
36+
import pandas
37+
38+
data_dict = {"students": ["Vivek", "Deven", "Druv"], "Scores": [50, 60, 70]}
39+
40+
# Create new data from out of dict
41+
data: pandas.DataFrame
42+
data = pandas.DataFrame(data_dict)
43+
44+
# print data
45+
print(data)
46+
47+
# print to new filr
48+
data.to_csv("TestScore.csv")
49+
```

0 commit comments

Comments
 (0)