Pandas Import करना
हर कोई Pandas को pd की तरह import करता है ताकि code पूरी community में same दिखे।
In this page:
Syntax
import pandas as pd
import numpy as np
Pandas Import करना
Standard import import pandas as pd है, आमतौर पर import numpy as np के साथ। इसके बाद, सारे functions pd.something की तरह पहुँचे जाते हैं। pd alias लगभग हर tutorial, book, और Stack Overflow answer में इस्तेमाल होता है।
Note:
pd.__version__ print करना यह confirm करने का सबसे fast तरीका है कि आप क्या चला रहे हैं।
उदाहरण: Importing Pandas
import pandas as pd
import numpy as np
print(type(pd.__version__))
s = pd.Series([1, 2, np.nan])
print(s)
# Output:
# <class 'str'>
# 0 1.0
# 1 2.0
# 2 NaN
# dtype: float64
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- एक अलग alias इस्तेमाल करना
- from pandas import * इस्तेमाल करना
- ज़रूरत पड़ने पर numpy import करना भूल जाना
चैप्टर सारांश
- import pandas as pd से import करें
- अक्सर import numpy as np के साथ pair होता है
- pd.__version__ version दिखाता है
- Star imports से बचें
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: