Last answered:

23 Aug 2024

Posted on:

10 Aug 2024

0

Series Object vs Data frame

if both series and single column data frame looks the same: one column with index. what is the aim or the target from converting the data frame to series


Another question for the single column data csv sheet, how it is comma separted although only consist of one column filled with one word. I don't understand why it is considered csv type

1 answers ( 0 marked as helpful)
Instructor
Posted on:

23 Aug 2024

0
Hi Asmaa!

Thanks for reaching out.

1) This depends on your analytical task. You may not need the data from an entire DataFrame. This technique allows you to retrieve only a single-column data stored in an object that can be manipulated in many ways - a pandas Series object.
2) The different values within that column can still be separated by a comma (what matters is how the data is separated, not necessarily the content). This is not always the case, sometimes the delimiter can be another symbol (e.g. a tab, or a space). In that case it would be more precise to say "delimiter-separated values", but we only refer to this type of files if specifically we don't want the delimiter to be a comma. In most cases, we refer to *.csv. 
For instance, you can use Sublime or Notepad++ to open a *.csv file and see how the data has been separated.

Hope this helps.
Best,
Martin

Submit an answer