Skip to content

Commit 0a0035d

Browse files
committed
First commit
0 parents  commit 0a0035d

14 files changed

+2416
-0
lines changed

Diff for: .ipynb_checkpoints/Series 1D arrays -checkpoint.ipynb

+418
Large diffs are not rendered by default.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

Diff for: .ipynb_checkpoints/filtering series-checkpoint.ipynb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

Diff for: .ipynb_checkpoints/firstpanda-checkpoint.ipynb

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 2,
6+
"id": "6b5222e4",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"import pandas as pd"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": 3,
16+
"id": "daae5aa6",
17+
"metadata": {},
18+
"outputs": [
19+
{
20+
"data": {
21+
"text/plain": [
22+
"0 1\n",
23+
"1 2\n",
24+
"2 3\n",
25+
"3 4\n",
26+
"4 5\n",
27+
"5 6\n",
28+
"6 7\n",
29+
"dtype: int64"
30+
]
31+
},
32+
"execution_count": 3,
33+
"metadata": {},
34+
"output_type": "execute_result"
35+
}
36+
],
37+
"source": [
38+
"a = pd.Series([1,2,3,4,5,6,7])\n",
39+
"a"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": 5,
45+
"id": "189bfb0b",
46+
"metadata": {},
47+
"outputs": [
48+
{
49+
"name": "stdout",
50+
"output_type": "stream",
51+
"text": [
52+
"1.3.4\n"
53+
]
54+
}
55+
],
56+
"source": [
57+
"print(pd.__version__) #to discover the version of pandas!"
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"id": "bc1682ee",
64+
"metadata": {},
65+
"outputs": [],
66+
"source": []
67+
}
68+
],
69+
"metadata": {
70+
"kernelspec": {
71+
"display_name": "Python 3 (ipykernel)",
72+
"language": "python",
73+
"name": "python3"
74+
},
75+
"language_info": {
76+
"codemirror_mode": {
77+
"name": "ipython",
78+
"version": 3
79+
},
80+
"file_extension": ".py",
81+
"mimetype": "text/x-python",
82+
"name": "python",
83+
"nbconvert_exporter": "python",
84+
"pygments_lexer": "ipython3",
85+
"version": "3.9.7"
86+
}
87+
},
88+
"nbformat": 4,
89+
"nbformat_minor": 5
90+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

Diff for: .ipynb_checkpoints/series sorting-checkpoint.ipynb

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "07417a66",
7+
"metadata": {},
8+
"outputs": [
9+
{
10+
"data": {
11+
"text/plain": [
12+
"0 7\n",
13+
"1 4\n",
14+
"2 9\n",
15+
"3 2\n",
16+
"4 1\n",
17+
"dtype: int64"
18+
]
19+
},
20+
"execution_count": 1,
21+
"metadata": {},
22+
"output_type": "execute_result"
23+
}
24+
],
25+
"source": [
26+
"import pandas as pd\n",
27+
"obj1 = pd.Series([7,4,9,2,1])\n",
28+
"obj1"
29+
]
30+
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": 2,
34+
"id": "46589501",
35+
"metadata": {},
36+
"outputs": [
37+
{
38+
"data": {
39+
"text/plain": [
40+
"4 1\n",
41+
"3 2\n",
42+
"1 4\n",
43+
"0 7\n",
44+
"2 9\n",
45+
"dtype: int64"
46+
]
47+
},
48+
"execution_count": 2,
49+
"metadata": {},
50+
"output_type": "execute_result"
51+
}
52+
],
53+
"source": [
54+
"obj1.sort_values() #it will sort according to the values"
55+
]
56+
},
57+
{
58+
"cell_type": "code",
59+
"execution_count": 7,
60+
"id": "b8f302ab",
61+
"metadata": {},
62+
"outputs": [
63+
{
64+
"data": {
65+
"text/plain": [
66+
"2 9\n",
67+
"0 7\n",
68+
"1 4\n",
69+
"3 2\n",
70+
"4 1\n",
71+
"dtype: int64"
72+
]
73+
},
74+
"execution_count": 7,
75+
"metadata": {},
76+
"output_type": "execute_result"
77+
}
78+
],
79+
"source": [
80+
"obj1.sort_values(ascending = False) #it will sort in the descending order!"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": 9,
86+
"id": "a15b3a63",
87+
"metadata": {},
88+
"outputs": [
89+
{
90+
"data": {
91+
"text/plain": [
92+
"0 7\n",
93+
"1 4\n",
94+
"2 9\n",
95+
"3 2\n",
96+
"4 1\n",
97+
"dtype: int64"
98+
]
99+
},
100+
"execution_count": 9,
101+
"metadata": {},
102+
"output_type": "execute_result"
103+
}
104+
],
105+
"source": [
106+
"obj1.sort_index() #ascending order main indexes hojayengay sort (jo normally hota hai series main)"
107+
]
108+
},
109+
{
110+
"cell_type": "code",
111+
"execution_count": 10,
112+
"id": "fd5a8c5b",
113+
"metadata": {},
114+
"outputs": [
115+
{
116+
"data": {
117+
"text/plain": [
118+
"4 1\n",
119+
"3 2\n",
120+
"2 9\n",
121+
"1 4\n",
122+
"0 7\n",
123+
"dtype: int64"
124+
]
125+
},
126+
"execution_count": 10,
127+
"metadata": {},
128+
"output_type": "execute_result"
129+
}
130+
],
131+
"source": [
132+
"obj1.sort_index(ascending = False) #descending order main indexes k hisaab se sorting hojayegi"
133+
]
134+
},
135+
{
136+
"cell_type": "code",
137+
"execution_count": null,
138+
"id": "35629b57",
139+
"metadata": {},
140+
"outputs": [],
141+
"source": []
142+
}
143+
],
144+
"metadata": {
145+
"kernelspec": {
146+
"display_name": "Python 3 (ipykernel)",
147+
"language": "python",
148+
"name": "python3"
149+
},
150+
"language_info": {
151+
"codemirror_mode": {
152+
"name": "ipython",
153+
"version": 3
154+
},
155+
"file_extension": ".py",
156+
"mimetype": "text/x-python",
157+
"name": "python",
158+
"nbconvert_exporter": "python",
159+
"pygments_lexer": "ipython3",
160+
"version": "3.9.7"
161+
}
162+
},
163+
"nbformat": 4,
164+
"nbformat_minor": 5
165+
}

0 commit comments

Comments
 (0)