Giter Club home page Giter Club logo

a_little_book_of_python_for_multivariate_analysis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a_little_book_of_python_for_multivariate_analysis's Issues

check the following possible error

From email I received.

"""
I found an error in your book on multivariate analysis. The following line in the def pca_summary(pca, standardised_data, out=True): section should be changed to allow zip to be used in creating a dataframe.

pd.DataFrame(zip(a, b, c), index=names, columns=columns) -> pd.DataFrame(list(zip(a, b, c)), index=names, columns=columns)

Thanks for this nice little writeup!
"""

Please help with the pandas plot error i see

Tried:
As i am a bit new to python not sure why i get this error for my dataset? Please help out

pd.tools.plotting.scatter_matrix(data.loc[:, "V2":"V6"], diagonal="kde")
plt.tight_layout()
plt.show()

Issue:

ValueError Traceback (most recent call last)
in ()
----> 1 pd.tools.plotting.scatter_matrix(data.loc[:, "V10":"V10"], diagonal="kde")
2 #plt.tight_layout()
3 #plt.show()

/home/hs/dl160_bkp/perf_engg/anaconda2/lib/python2.7/site-packages/pandas/tools/plotting.pyc in wrapper(*args, **kwargs)
15 "import 'pandas.plotting.{t}' instead.".format(t=t),
16 FutureWarning, stacklevel=2)
---> 17 return getattr(_plotting, t)(*args, **kwargs)
18 return wrapper
19

/home/hs/dl160_bkp/perf_engg/anaconda2/lib/python2.7/site-packages/pandas/plotting/_misc.pyc in scatter_matrix(frame, alpha, figsize, ax, grid, diagonal, marker, density_kwds, hist_kwds, range_padding, **kwds)
58 naxes = n * n
59 fig, axes = _subplots(naxes=naxes, figsize=figsize, ax=ax,
---> 60 squeeze=False)
61
62 # no gaps between subplots

/home/hs/dl160_bkp/perf_engg/anaconda2/lib/python2.7/site-packages/pandas/plotting/_tools.pyc in _subplots(naxes, sharex, sharey, squeeze, subplot_kw, ax, layout, layout_type, **fig_kw)
236
237 # Create first subplot separately, so we can share it if requested
--> 238 ax0 = fig.add_subplot(nrows, ncols, 1, **subplot_kw)
239
240 if sharex:

/home/hs/dl160_bkp/perf_engg/anaconda2/lib/python2.7/site-packages/matplotlib/figure.pyc in add_subplot(self, *args, **kwargs)
1237 self._axstack.remove(ax)
1238
-> 1239 a = subplot_class_factory(projection_class)(self, *args, **kwargs)
1240 self._axstack.add(key, a)
1241 self.sca(a)

/home/hs/dl160_bkp/perf_engg/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_subplots.pyc in init(self, fig, args, **kwargs)
65 raise ValueError(
66 ("num must be 1 <= num <= {maxn}, not {num}"
---> 67 ).format(maxn=rows
cols, num=num))
68 self._subplotspec = GridSpec(
69 rows, cols, figure=self.figure)[int(num) - 1]

ValueError: num must be 1 <= num <= 0, not 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.