Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Removing and Replacing | Preprocessing Data: Part II
Analyzing and Visualizing Real-World Data
セクション 2.  2
single

single

bookRemoving and Replacing

メニューを表示するにはスワイプしてください

As mentioned previously, there are two ways to perform removing or replacing operations. Since we used the .str accessor two chapters ago, let's use a lambda function this time.

タスク

スワイプしてコーディングを開始

  1. Define a lambda function with a single argument x that will:

    • Remove the '$' characters starting from the left (using the .lstrip() method);

    • Replace all blank spaces (' ') with empty strings ('') (using the .replace() method);

    • Assign the function to the rmv_rpl variable.

  2. Apply the rmv_rpl function to the 'Weekly_Sales' column using the .apply() method and convert it to the float data type.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt