Python Pandas اسئلة واجوبة المقابلات
سؤال 26. Explain the use of the describe function in Pandas.
describe generates descriptive statistics of a DataFrame, excluding NaN values.
Example:
df.describe()
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 27. How can you drop columns from a Pandas DataFrame?
Use the drop function. df.drop(['column1', 'column2'], axis=1)
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 28. Explain the concept of method chaining in Pandas.
Method chaining is a way of applying multiple operations on a DataFrame in a single line of code.
Example:
df.dropna().mean()
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 29. What is the purpose of the iterrows() function in Pandas?
iterrows() is used to iterate over DataFrame rows as (index, Series) pairs.
Example:
for index, row in df.iterrows():
print(index, row['column'])
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 30. Explain the use of the get_dummies() function in Pandas.
get_dummies() is used to convert categorical variable(s) into dummy/indicator variables.
Example:
pd.get_dummies(df['column'])
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
الاكثر فائدة حسب تقييم المستخدمين:
- 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?