Pandas Series In Hindi

Python Pandas

Pandas Series In Hindi – Python Pandas Series Ek Tarah Ki Table Me Column Ki Tarah Hoti Hai, Ise Ham Series Bhi Kahte Hai |

Python Pandas Me Two Types Ke Data Type Hoti hai, Ek Series And Dusri Yani Ke Second Data Frame, Inhe Ham Is Tarah Se Bhi kahte Hai Ki, Series 1-D Array Hoti hai, And Data Frame 2-D Array Hoti Hai |

Pandas Series In Hindi

Is Post Me Ham Pandas Series Ke Examples Ko Dekhte Wale Hai, Or Ye Bhi Dekhte Hai, Ki Ham Pandas Series Se Kiya Kiya Kar Sakte hai |

Example 1:

import pandas as pd

a = [1, 3, 4]

myvar = pd.Series(a)

print(myvar)

Aap Upper Dekhte Hai, Hamne a Variable Me Ek List Ko Create Kiya Hai, And Uske Bad Hamne pd.Series(a) Ko Assign Kiya Hai, Isse Hamari Series Create Ho Gayi Hai |

Output:

0    1
1    3
2    4
dtype: int64

Example 2:

import pandas as pd

a = [1, 3, 4]

myvar = pd.Series(a, index=["First","Second", "Thrid"])

print(myvar)

Ham index function Ki Help Se Index Bhi Aapni Marzi Ke Hisab Se De Sakte Hai, Aap Example 2: Ka Output Niche Dekh Sakte Hai |

Python Numpy Tutorial In Hindi

Output:

First     1
Second    3
Thrid     4
dtype: int64

Example 3:

import pandas as pd

Ranking = {"Python": 1, "JavaScript": 2, "Java": 3}

myvar = pd.Series(Ranking)

print(myvar)

Aap Key Value Bhi De Sakte Hai, Jaise Aap Python Dictionary Ka Istemal Karte Hai, Waise Hi Isme Aap Key/Value De Kar Label Or Value Bhi Sakte Hai |

Key Isme Label Me Convert Ho Jati Hai |

Output:

Python        1
Javascript    2
Java          3
dtype: int64

Example 4:

import pandas as pd

calories = {"day1": 420, "day2": 380, "day3": 390}

myvar = pd.Series(calories, index = ["day1", "day2"])

print(myvar)

Waise Aap Label Bhi De Sakte Hai, index Function Help Se, Aap Iska Output Niche Dekh Sakte Hai |

Output:

day1    420
day2    380
dtype: int64

Python Networking Course In Hindi4

Leave a Reply

Your email address will not be published. Required fields are marked *