Sai

Joining DataFrames

[ Joining Data Frames¶ Let us understand how to join Data Frames using Pandas. In [1]: %run 06_csv_to_pandas_data_frame.ipynb In [2]: orders Out[2]: order_id order_date order_customer_id order_status 0 1 2013-07-25 00:00:00.0 11599 CLOSED 1 2 2013-07-25 00:00:00.0 256 PENDING_PAYMENT 2 3 2013-07-25 00:00:00.0 12111 COMPLETE 3 4 2013-07-25 00:00:00.0 8827 CLOSED 4 5 2013-07-25 00:00:00.0 11318 COMPLETE … …

Joining DataFrames Read More »

Performing Total Aggregations

[ Performing Total Aggregations¶ Let us understand how to perform total or global aggregations using Pandas. In [1]: %run 06_csv_to_pandas_data_frame.ipynb Getting number of records in the Data Frame. In [2]: orders.shape Out[2]: (68883, 4) In [3]: orders.shape[0] Out[3]: 68883 In [4]: order_items.shape[0] Out[4]: 172198 Getting number of non np.NaN values in each attribute in a Data Frame In [5]: orders.count() …

Performing Total Aggregations Read More »

Projecting and Filtering

[ Projecting and Filtering¶ Let us understand how to project as well as filter data in Data Frames. In [1]: %run 06_csv_to_pandas_data_frame.ipynb In [2]: orders Out[2]: order_id order_date order_customer_id order_status 0 1 2013-07-25 00:00:00.0 11599 CLOSED 1 2 2013-07-25 00:00:00.0 256 PENDING_PAYMENT 2 3 2013-07-25 00:00:00.0 12111 COMPLETE 3 4 2013-07-25 00:00:00.0 8827 CLOSED 4 5 2013-07-25 …

Projecting and Filtering Read More »