Python Pandas اسئلة واجوبة المقابلات
سؤال 16. Explain the difference between Series and DataFrame in Pandas.
A Series is a one-dimensional labeled array, and a DataFrame is a two-dimensional table.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 17. How do you convert a Pandas DataFrame to a NumPy array?
Use the values attribute. df.values
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 18. What is the purpose of the nunique function in Pandas?
nunique returns the number of unique elements in a Series or DataFrame.
Example:
df['column'].nunique()
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 19. How can you reset the index of a Pandas DataFrame?
Use the reset_index function. df.reset_index()
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 20. Explain the concept of MultiIndex in Pandas.
MultiIndex is used to represent hierarchical index levels in a DataFrame.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
الاكثر فائدة حسب تقييم المستخدمين:
- What is Pandas in Python?
- How do you select specific columns from a DataFrame?
- How do you import the Pandas library?
- How can you apply a function to each element in a DataFrame?
- How can you rename columns in a Pandas DataFrame?