# Pandas Data Frames In Hindi

Pandas Data Frames In Hindi – Python Pandas DataFrames Ek Tarah Ki Table Me Columns And Rows Ki Tarah Hota Hai, Ise Ham DataFamess 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 Data Frames In Hindi

Contents

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

Example 1:

```import pandas as pd

a = [[1, 2, 3],[4,5,6]]

myvar = pd.DataFrame(a)

print(myvar)```

Aap Upper Dekh Sakte Hai, Hamne a Variable Me Ek List Ke Ander 2 List Ko Create Kiya Hai, And Uske Bad Hamne pd.DataFrame(a) Ko Assign Kiya Hai, Isse Hamari DataFrame Create Ho Gayi Hai |

Output:

```   0  1  2
0  1  2  3
1  4  5  6```

Example 2:

```import pandas as pd

a = [[1, 2, 3],[4,5,6]]

myvar = pd.DataFrame(a, index = ["One R","Two R"])
myvar.columns =['One C', 'Two C', 'Three C']
print(myvar)```

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

Output:

```       One C  Two C  Three C
One R      1      2        3
Two R      4      5        6```

Python Numpy Tutorial In Hindi

### Pandas Loc Function In Hindi

Pandas loc Functions Se Ham Particular Row Ko Print Ya Fir Etc.. Bhi Kara Sakte Hai, And Ye Function Return Me Ek Row Deta Hai,Iske Ham Kuch Examples Ko Dekhte Hai |

Example 1:

```import pandas as pd

a = [[1, 2, 3],[4,5,6]]

myvar = pd.DataFrame(a, index = ["One R","Two R"])
myvar.columns =['One C', 'Two C', 'Three C']
print(myvar)
print("------------------------")
print(myvar.loc['One R'])```

myvar.loc[‘One R’] Me Hamne Ek Row Ko Print Kara Rahe Hai, Or Dhiyan Rahe Jab Ye Row Ko Print Karta Hai, To Ye Series Ho jati hai |

Output:

```       One C  Two C  Three C
One R      1      2        3
Two R      4      5        6
------------------------
One C      1
Two C      2
Three C    3
Name: One R, dtype: int64```

Example 2:

```import pandas as pd

a = [[1, 2, 3],[4,5,6]]

myvar = pd.DataFrame(a, index = ["One R","Two R"])
myvar.columns =['One C', 'Two C', 'Three C']
print(myvar)
print("------------------------")
print(myvar.loc['One R','One C'])```

Aap Row Ko Column Ki Help Se DataFrame Me Se Koi Bhi Particular Number Print Kara Sakte Hai, Jaise Aap Is Example 2 Me Dekh Rahe Hai, Iska Output Aap Niche Dekh Sakte Hai |

Output:

```       One C  Two C  Three C
One R      1      2        3
Two R      4      5        6
------------------------
1```

Example 3:

```import pandas as pd

a = [[1, 2, 3],[4,5,6]]

myvar = pd.DataFrame(a, index = ["One R","Two R"])
myvar.columns =['One C', 'Two C', 'Three C']
print(myvar)
print("------------------------")
print(myvar.loc[['One R','Two R']])```

Aap [[DataFrame]] Me Multiple Rows Bhi Print Kara Sakte Hai,

Output:

```       One C  Two C  Three C
One R      1      2        3
Two R      4      5        6
------------------------
One C  Two C  Three C
One R      1      2        3
Two R      4      5        6```

### Load Files Into a DataFrame In Pandas In Hindi

Agar Aapke Pass Excel Ya Fir CSV Etc.. Files Me Data Store Hai, To Aap Pandas Ki Help Se Data Ko Load Bhi Kara Sakte Hai, Uske Sath Aap Kuch Bhi Editing Kar Sakte Hai |

Python Networking Course In Hindi

Example 1:

```import pandas as pd
print(df)```

Output:

```       Duration  Pulse  Maxpulse  Calories
0          60    110       130     409.1
1          60    117       145     479.0
2          60    103       135     340.0
3          45    109       175     282.4
4          45    117       148     406.0
..        ...    ...       ...       ...
164        60    105       140     290.8
165        60    110       145     300.4
166        60    115       145     310.2
167        75    120       150     320.4
168        75    125       150     330.4

[169 rows x 4 columns]```

Example 2:

```import pandas as pd

print(df.info())```

info() Function Ki Help Se Data Ki Information Le Sakte Hai |

Output:

```<class 'pandas.core.frame.DataFrame'>
RangeIndex: 169 entries, 0 to 168
Data columns (total 4 columns):
#   Column    Non-Null Count  Dtype
---  ------    --------------  -----
0   Duration  169 non-null    int64
1   Pulse     169 non-null    int64
2   Maxpulse  169 non-null    int64
3   Calories  164 non-null    float64
dtypes: float64(1), int64(3)
memory usage: 5.4 KB
None```