BaşlayınÜcretsiz Başlayın

Working with pandas

pandas is one of Python's most popular packages for data analysis and manipulation. It provides powerful data structures like DataFrames, which let you work with structured data efficiently - filtering, aggregating, and transforming datasets with just a few lines of code. As a developer, you'll often encounter pandas when building e-commerce platforms, processing transaction data, or implementing analytics features for business dashboards.

In this exercise, the sales dictionary has been created and contains information on recent transactions.

Bu egzersiz

Intermediate Python for Developers

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import the pandas module using an alias of pd.
  • Convert sales into a DataFrame, saving as sales_df.
  • Preview the first few rows of sales_df.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import pandas as pd
import pandas ____ ____

# Convert sales to a pandas DataFrame
sales_df = ____.____(sales)

# Preview the first few rows
print(sales_df.____())
Kodu Düzenle ve Çalıştır