Pandas اسئلة واجوبة المقابلات
سؤال 11. How to select specific columns in a DataFrame?
You can select specific columns using double square brackets: df[['Column1', 'Column2']]
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 12. What is the purpose of the describe() function in Pandas?
describe() provides summary statistics of numeric columns in a DataFrame.
Example:
df.describe()
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 13. Explain the concept of broadcasting in Pandas.
Broadcasting allows operations between arrays of different shapes and sizes.
Example:
df['Column'] = df['Column'] * 2
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 14. How to filter rows in a DataFrame based on a condition?
You can use boolean indexing to filter rows based on a condition: df[df['Column'] > 10]
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 15. What is the purpose of the pivot_table() function?
pivot_table() is used to create a spreadsheet-style pivot table as a DataFrame.
Example:
pd.pivot_table(df, values='Value', index='Index', columns='Column', aggfunc=np.sum)
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
الاكثر فائدة حسب تقييم المستخدمين: