#๐Ÿ”’ the squeeze parameter was deleted from pandas, what should I do ?

18 messages ยท Page 1 of 1 (latest)

swift saddleBOT
#

@scenic mason

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

umbral ore
#

Can you elaborate?

scenic mason
# umbral ore Can you elaborate?

with the pandas library there was the squeeze parameter allowing you to create a Series, the problem is that this parameter no longer exists and I can't find how to replace it

umbral ore
#

On what function?

scenic mason
#

read_csv

scenic mason
umbral ore
#

I can't find info about that function ever having had a squeeze parameter, but anyway - if you want to take the only column of a dataframe, just do that via indexing, e.g. .iloc[:, 0].

scenic mason
#

yes but I would like to understand why pandas were removed when it allowed you to create Series easily

umbral ore
#

ah, I found it

#

looks like they just thought it's useless, which makes sense:

scenic mason
#

oh ok

#

thx it's kind ๐Ÿ™‚

molten pine
#

Not only useless/redundant, but also confusing. If the csv file contains multiple columns, the parameter would do nothing, and still return the full dataframe.

swift saddleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ the squeeze parameter was deleted from pandas, what should I do ?