0Pricing
Data Science Academy · レッスン

行、列、インデックス

DataFrameの基本的な捉え方を学びます

「行、列、インデックス」はCoddyKit上の無料Data Science Academyレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはData Science Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Data Science Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

A Table You Can Code

A DataFrame is pandas' spreadsheet in code: rows and columns of data you can slice, sort, and compute on instantly. 📊

Two Axes, One Grid

Every DataFrame has two axes: rows run top to bottom, columns run left to right. Together they form one tidy grid of values.

Columns Are the Variables

Each column holds one variable, like price or city, and shares a single data type. Think of a column as one measured thing.

Rows Are the Records

Each row is one record: a customer, a day, a sale. Read a row across and you get the full story of one observation.

Meet the Index

The index is the label down the left side that names every row. By default it counts 0, 1, 2, but it can be anything unique.

df.index

Columns Have Labels Too

The column headers form their own label set, the columns attribute. You select data by these names instead of guessing positions.

df.columns

Shape Tells the Size

The shape attribute returns rows and columns as a pair. shape[0] is your row count, shape[1] is your column count.

df.shape  # (rows, cols)

One Column Is a Series

Pull a single column and pandas hands you a Series: a one-dimensional labeled array. A DataFrame is really a stack of Series.

df["price"]

Set a Meaningful Index

You can promote a column to be the index when it identifies rows, like an order id. It makes lookups clearer and faster.

df.set_index("order_id")

Labels Drive Everything

Pandas aligns and joins data by labels, not row order. That is why a thoughtful index quietly powers most of your analysis.

Reset When You Need To

Need a plain counting index back? reset_index moves the current index into a column and gives you fresh 0-based labels.

df.reset_index()

Quick Check

Time to test the mental model of a DataFrame.

Recap: The DataFrame Map

Rows are records, columns are variables, and the index labels every row. Know this map and the rest of pandas clicks. 🗺️

よくある質問

「行、列、インデックス」レッスンは無料ですか?

はい。「行、列、インデックス」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Data Science Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Data Science Academyコースには全4レッスンが含まれています。

「行、列、インデックス」で何を学びますか?

DataFrameの基本的な捉え方を学びます ブラウザで直接実行するハンズオンコードでData Science Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Data Science Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのData Science Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。

「行、列、インデックス」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このData Science Academyレッスンでコードを書いて実行できますか?

はい。すべてのData Science Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. 行、列、インデックス
  2. ゼロからDataFrameを作成する
  3. head、info、describe
  4. 列の追加、名前変更、削除
← Data Science Academyに戻る