Thanks for replying, I'm able to add new columns with LOC or without LOC.
My question is why the below message coming while executing the syntax



*E:\BIBEESH\PYTHON\NSE\Basan_Version_1.ipy:295: SettingWithCopyWarning:A
value is trying to be set on a copy of a slice from a DataFrame.Try using
.loc[row_indexer,col_indexer] = value instead*

*See the caveats in the
documentation: 
https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
<https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy>
R2["BUY_SELL"]="SELL"*

On Tue, Jun 9, 2020 at 10:06 AM Jim Lareau <[email protected]> wrote:

> Yet again, a simple Google search:
>
> pandas dataframe add column
>
> yields as one result, the url:
>
> Adding new column to existing DataFrame in Pandas - GeeksforGeeks
>
> https://www.geeksforgeeks.org/adding-new-column-to-existing-dataframe-in-pandas/
>
> Which answers your question.
>
> Regards,
>
> Jim
>
> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/spyderlib/0142af4e-b02c-4660-b2a8-4c507bcebeabo%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/CAKbBZ2QFZLBhVxCgPSg1PKAZTFykWVn0qWU-kz7WF_wMuCssfg%40mail.gmail.com.

Reply via email to