Hello!

I'd recommend checking out the Pandas documention (
https://pandas.pydata.org/pandas-docs/stable/) for ideas of how to use it.
Jupyter makes it possible to use interactive tools like Pandas, but it
doesn't create Pandas itself so this isn't the best place to ask for
support (I'd bet Pandas has a mailing list though). Another good option is
the "scipy-lectures" website which has several helpful modules (and I think
covers Pandas) http://scipy-lectures.org/intro/

On Sat, Mar 2, 2019 at 5:42 AM Vaibhav Dixit <[email protected]>
wrote:

> Dear Jupyter users and experts,
> I am new to using Jupyter notebook installed via "anaconda navigator".
> For my ML needs, I need to preprocess data in CSV file i.e. remove columns
> with < 5% std (and remove rows for which > 50% features are zero valued
> etc).
> I tried the std condition with the following code, but it gives the
> following error.
> I couldn't find an easy solution in manuals and with google either.
> Can you please suggest me on a possible fix for this?
> thanks.
>
> Code:
> ----------
> import pandas as pd
> import numpy as np
> #df = pd.DataFrame()
> with open('test.csv', 'r', encoding="ascii", errors="surrogateescape") as
> f:
>     data = f.read()
> #f = pd.read_csv('test.csv')
>     df = pd.DataFrame(f)
>
> #    pd.std(axis=10)
>     rmcols = pd.drop(pd.std()[(pd.std() == 0)].index, axis=1)
>     rmcols.to_csv('new.csv')
> -------------
>
> Error:
> -------------
>
> AttributeError                            Traceback (most recent call 
> last)<ipython-input-22-76d08e00951a> in <module>      8       9 #    
> pd.std(axis=10)---> 10     rmcols = pd.drop(pd.std()[(pd.std() == 0)].index, 
> axis=1)     11     rmcols.to_csv('new.csv')
> AttributeError: module 'pandas' has no attribute 'drop'
>
> ------------
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/a798b950-0a3a-4b80-8ef7-7ba91593f893%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/a798b950-0a3a-4b80-8ef7-7ba91593f893%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAD7kTDE-%2B-r9pgxV2_JwCObdb-VdiK3MJCr7RP06EX08GGY6Yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to