id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
pandas_user_guide/vectorizationinpanda_43_0.txt
data = {'A': [1, 2, 3]} df = pd.DataFrame(data)
pandas_user_guide/pandas_user_guide_27_48.txt
.....: } .....: ) .....: In [440]: df Out[440]: A B C 0 -0.317441 foo 2013-01-01 00:00:00 1 -1.236269 foo 2013-01-01 00:00:01 2 0.896171 foo 2013-01-01 00:00:02 3 -0.487602 foo 2013-01-01 00:00:03 4 -0.082240 foo...
pandas_user_guide/howtospeeduppythonpa_170_0.txt
#### SXM vs PCIe: GPUs Best for Training LLMs like GPT-4
pandas_user_guide/pandasvectorization_32_0.txt
In [64]:
pandas_user_guide/tutorialbasicvectori_79_0.txt
## Explore topics
pandas_user_guide/pandas_user_guide_2_40.txt
* Assembling datetime from multiple DataFrame columns * Invalid data * Epoch timestamps * From timestamps to epoch * Using the ` origin ` parameter * Generating ranges of timestamps * Custom frequency ranges * Timestamp limitations * Indexing * Partial string indexing *...
pandas_user_guide/pandas_user_guide_9_17.txt
The above exception was the direct cause of the following exception: KeyError Traceback (most recent call last) Cell In[208], line 1 ----> 1 s[-1] File ~/work/pandas/pandas/pandas/core/series.py:1112, in Series.__getitem__(self, key) 1109 retu...
pandas_user_guide/howtospeeduppythonpa_107_0.txt
[ ](https://www.linkedin.com/shareArticle?mini=true&url=https://www.exxactcorp.com/blog/Deep- Learning/how-to-speed-up-python-pandas-by-over-300x)
pandas_user_guide/pandas_user_guide_2_31.txt
1 2011-02 0.514474 2011-03 1.346470 2011-04 0.816397 2011-05 2.258648 2011-06 0.494789 2011-07 0.301239 2011-08 0.464776 2011-09 -1.393581 2011-10 0.056780 2011-11 0.197035 2011-12 2.261385 2012-01 -0.329583 Freq: M, dtype: float64 ...
pandas_user_guide/vectorizationinpanda_20_0.txt
[ ](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F3a4fda08a184&operation=register&redirect=https%3A%2F%2Fpython.plainenglish.io%2Fvectorization- in-pandas-simplifying-data-operations-3a4fda08a184&source=-----3a4fda08a184 ---------------------bookmark_footer-----------)
pandas_user_guide/pandas_user_guide_18_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/vectorizationinpanda_78_0.txt
1. Create two NumPy arrays ( ` array1 ` and ` array2 ` ) and two lists ( ` list1 ` and ` list2 ` ) containing a large number of random integers. 2. Define two functions, ` numpy_vectorized ` and ` loop_based ` , which represent the vectorized and loop-based approaches, respectively. 3. Use the ` timeit ` module to meas...
pandas_user_guide/pandas_user_guide_27_27.txt
ing[pyarrow] i string[pyarrow] j null[pyarrow] dtype: object ### Normalization # pandas provides a utility function to take a dict or list of dicts and _normalize_ this semi-structured data into a flat table. In [289]: data = [ .....: {"id": 1, "name": {"first": "C...
pandas_user_guide/tutorialbasicvectori_67_0.txt
Celebrate
pandas_user_guide/howtospeeduppythonpa_10_0.txt
# How to Speed Up Python Pandas by over 300x
pandas_user_guide/pandas_user_guide_26_11.txt
s groupby aggregations. In this case there’s no column selection, so the values are just the functions. In [114]: animals.groupby("kind").height.agg( .....: min_height="min", .....: max_height="max", .....: ) .....: Out[114]: min_height max_height ...
pandas_user_guide/pandas_user_guide_5_26.txt
> 1 b > 2 c > 3 aaba > 4 baca > 5 <NA> > 6 caba > 7 dog > 8 cat > dtype: string > Powerful pattern-matching methods are provided as well, but note that pattern- matching generally uses [ regular expressions ](https://docs.python.org/3/library/re.ht...
pandas_user_guide/pandas_user_guide_10_12.txt
e ` . Data will be transposed to meet matplotlib’s default layout. In [184]: np.random.seed(123456) In [185]: fig, ax = plt.subplots(1, 1, figsize=(7, 6.5)) In [186]: df = pd.DataFrame(np.random.rand(5, 3), columns=["a", "b", "c"]) In [187]: ax.xaxis.tick_top() # Display x-a...
pandas_user_guide/tutorialbasicvectori_34_0.txt
* [ https://medium.com/@HenryDucLai/tutorial-basic-vectorization-and-pandas-iterrows-apply-and-performance-comparison-cb1c15904ffc ](https://medium.com/@HenryDucLai/tutorial-basic-vectorization-and-pandas-iterrows-apply-and-performance-comparison-cb1c15904ffc)
pandas_user_guide/pandas_user_guide_18_13.txt
(the native compressed formats which ` read_csv ` understands). This example shows a ` WinZipped ` file, but is a general application of opening the file within a context manager and using that handle to read. [ See here ](https://stackoverflow.com/questions/17789907/pandas-convert-winzipped-csv- file-to-data-frame)...
pandas_user_guide/vectorizationinpanda_55_0.txt
Here’s an example in Python without vectorization:
pandas_user_guide/howtospeeduppythonpa_61_0.txt
![](https://images.contentstack.io/v3/assets/blt71da4c740e00faaa/blt802715ae36b81b29/65cbfed8862c4281dcfb6671/blog- color-block-img-4U-resize.png)
pandas_user_guide/howtospeeduppythonpa_47_0.txt
Wow, so much faster! About 9x faster, a huge improvement to a Loop. Now the Apply Function is perfectly fine to use and will be applicable in certain scenarios, but for our use case, let's see if we can speed it up more.
pandas_user_guide/howtospeeduppythonpa_134_0.txt
3.66 s ± 119 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
pandas_user_guide/pandas_user_guide_27_22.txt
unction which takes a single (float) argument and returns a formatted string; to be applied to floats in the ` DataFrame ` . * ` sparsify ` default True, set to False for a ` DataFrame ` with a hierarchical index to print every MultiIndex key at each row. * ` index_names ` default True, will print the names...
pandas_user_guide/howtospeeduppythonpa_155_0.txt
![](https://images.contentstack.io/v3/assets/blt71da4c740e00faaa/blt802715ae36b81b29/65cbfed8862c4281dcfb6671/blog- color-block-img-4U-resize.png)
pandas_user_guide/pandasvectorization_39_0.txt
| one | two ---|---|--- a | True | True b | True | True c | True | True d | True | True
pandas_user_guide/pandas_user_guide_24_20.txt
0.034870 | 1.231686 | 0.236600 | 1.234720 | -0.040247 | 0.029582 | 1.034905 | 0.380204 | -0.012108 | -0.859511 | -0.990340 | -1.205172 | -1.030178 | 0.426676 | 0.497796 | -0.876808 | 0.957963 | 0.173016 | 0.131612 | -1.003556 | -1.069908 | -1.799207 | 1.429598 | -0.116015 ...
pandas_user_guide/pandas_user_guide_27_21.txt
t into the storage option parameter: storage_options = {"client_kwargs": {"endpoint_url": "http://127.0.0.1:5555"}}} df = pd.read_json("s3://pandas-test/test-1", storage_options=storage_options) More sample configurations and documentation can be found at [ S3Fs documentation ](https://s3fs.rea...
pandas_user_guide/pandas_user_guide_27_20.txt
0 1 2 3 0 -1.294524 0.413738 0.276662 -0.472035 1 -0.013960 -0.362543 -0.006154 -0.923061 2 0.895717 0.805244 -1.206412 2.565646 3 1.431256 1.340309 -1.170299 -0.226169 4 0.410835 0.813850 0.132003 -0.827317 ### Specifying the parser engine # Pandas c...
pandas_user_guide/howtospeeduppythonpa_76_0.txt
[ ![EXX-Blog-dl-sxm-vs-pcie- llm.jpg](https://images.contentstack.io/v3/assets/blt71da4c740e00faaa/blt20b0e9730e09a2c9/661869b5569f274b7faee6f5/EXX- Blog-dl-sxm-vs-pcie-llm.jpg?format=webp)
pandas_user_guide/howtospeeduppythonpa_15_0.txt
If we want our deep learning models to train on a dataset, we have to optimize our code to parse through that data quickly. We want to read our data tables as fast as possible using an optimized way to write our code. Even the smallest performance gain exponentially improves performance over tens of thousands of data p...
pandas_user_guide/pandas_user_guide_20_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/tutorialbasicvectori_64_0.txt
` `
pandas_user_guide/howtospeeduppythonpa_63_0.txt
Training AI models on massive datasets can be accelerated exponentially with the right system. It's not just a high-performance computer, but a tool to propel and accelerate your research.
pandas_user_guide/vectorizationinpanda_89_0.txt
# Conclusion
pandas_user_guide/pandas_user_guide_11_4.txt
ps://numba.pydata.org/) . Numba allows you to write a pure Python function which can be JIT compiled to native machine instructions, similar in performance to C, C++ and Fortran, by decorating your function with ` @jit ` . Numba works by generating optimized machine code using the LLVM compiler infrastructure at imp...
pandas_user_guide/pandas_user_guide_25_8.txt
6 8 -0.619976 dtype: float64 With a DataFrame: In [74]: df1 = pd.DataFrame(np.random.randn(6, 4), ....: index=list(range(0, 12, 2)), ....: columns=list(range(0, 8, 2))) ....: In [75]: df1 Out[75]: 0 ...
pandas_user_guide/pandas_user_guide_8_13.txt
er bid ask 0 2016-05-25 13:30:00.023 GOOG 720.50 720.93 1 2016-05-25 13:30:00.023 MSFT 51.95 51.96 2 2016-05-25 13:30:00.030 MSFT 51.97 51.98 3 2016-05-25 13:30:00.041 MSFT 51.99 52.00 4 2016-05-25 13:30:00.048 GOOG 720.50 720.93 5 2016-05-25 13:30:00.049 AAPL...
pandas_user_guide/pandasvectorization_19_0.txt
In [55]:
pandas_user_guide/vectorizationinpanda_91_0.txt
So, next time you work with data in Pandas, remember to embrace the benefits of vectorization to simplify your code and make it more efficient.
pandas_user_guide/tutorialbasicvectori_16_0.txt
` `
pandas_user_guide/pandas_user_guide_20_13.txt
inx Theme ](https://pydata-sphinx- theme.readthedocs.io/en/stable/index.html) 0.14.4.
pandas_user_guide/pandas_user_guide_27_3.txt
le the python engine is currently more feature-complete. Multithreading is currently only supported by the pyarrow engine. New in version 1.4.0: The “pyarrow” engine was added as an _experimental_ engine, and some features are unsupported, or may not work correctly, with this engine. converters dict, default ` ...
pandas_user_guide/pandas_user_guide_10_8.txt
; ![../_images/bootstrap_plot.png](../_images/bootstrap_plot.png) ### RadViz # RadViz is a way of visualizing multi-variate data. It is based on a simple spring tension minimization algorithm. Basically you set up a bunch of points in a plane. In our case they are equally spaced on a unit circle. Each point r...
pandas_user_guide/howtospeeduppythonpa_177_0.txt
Sign up chevron_right
pandas_user_guide/pandas_user_guide_2_28.txt
* 27) .....: print(group, end="\n\n") .....: Group: 2017-01-01 00:00:00 --------------------------- 2017-01-01 00:00:00 0 2017-01-01 00:30:00 1 2017-01-01 00:31:00 2 dtype: int64 Group: 2017-01-01 01:00:00 --------------------------- 2017-01-01 01:...
pandas_user_guide/pandas_user_guide_23_9.txt
he ‘.’ with ` NaN ` with regular expression that removes surrounding whitespace In [162]: df.replace(r"\s*\.\s*", np.nan, regex=True) Out[162]: a b c 0 0 a a 1 1 b b 2 2 NaN NaN 3 3 NaN d Replace with a list of regexes. In ...
pandas_user_guide/howtospeeduppythonpa_95_0.txt
[ ![EXX-Blog-dl-sxm-vs-pcie- llm.jpg](https://images.contentstack.io/v3/assets/blt71da4c740e00faaa/blt20b0e9730e09a2c9/661869b5569f274b7faee6f5/EXX- Blog-dl-sxm-vs-pcie-llm.jpg?format=webp)
pandas_user_guide/pandas_user_guide_3_7.txt
s. See the [ Merging section ](merging.html#merging) . Concatenating pandas objects together row-wise with [ ` concat() ` ](../reference/api/pandas.concat.html#pandas.concat "pandas.concat") : In [73]: df = pd.DataFrame(np.random.randn(10, 4)) In [74]: df Out[74]: 0 ...
pandas_user_guide/pandas_user_guide_12_1.txt
6]}) In [7]: subset = df["foo"] In [8]: subset.iloc[0] = 100 In [9]: df Out[9]: foo bar 0 1 4 1 2 5 2 3 6 The following sections will explain what this means and how it impacts existing applications. ## Migrating to Copy-on-Write # Copy-on-...
pandas_user_guide/howtospeeduppythonpa_113_0.txt
## Our Dataset and Problem
pandas_user_guide/vectorizationinpanda_8_0.txt
![](https://miro.medium.com/v2/resize:fill:64:64/1*dmbNkD5D-u45r44go_cf0g.png)
pandas_user_guide/vectorizationinpanda_6_0.txt
[ Sign up ](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fpython.plainenglish.io%2Fvectorization- in-pandas-simplifying-data-operations-3a4fda08a184&source=post_page--- two_column_layout_nav-----------------------global_nav-----------)
pandas_user_guide/vectorizationinpanda_95_0.txt
* _Be sure to_ **_clap_ ** _and_ **_follow_ ** _the writer! 👏_ * _You can find even more content at_ [ **_PlainEnglish.io_ ** ](https://plainenglish.io/) **_🚀_ ** * _Sign up for our_ [ **_free weekly newsletter_ ** ](http://newsletter.plainenglish.io/) _. 🗞️_ * _Follow us on_ [ **_Twitter_ ** ](https://twitter.com/i...
pandas_user_guide/pandas_user_guide_1_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/pandas_user_guide_18_2.txt
](https://stackoverflow.com/questions/21058254/pandas-boolean-operation-in-a- python-list/21058331) In [29]: df = pd.DataFrame( ....: {"AAA": [4, 5, 6, 7], "BBB": [10, 20, 30, 40], "CCC": [100, 50, -30, -50]} ....: ) ....: In [30]: df Out[30]: AAA BBB CCC...
pandas_user_guide/pandas_user_guide_23_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/vectorizationinpanda_126_0.txt
Privacy
pandas_user_guide/pandas_user_guide_27_78.txt
* SAS formats * SPSS formats * Other file formats * netCDF * Performance considerations [ __ Show Source ](../_sources/user_guide/io.rst.txt) © 2024, pandas via [ NumFOCUS, Inc. ](https://numfocus.org) Hosted by [ OVHcloud ](https://www.ovhcloud.com) . Created using [ Sphinx ](https://www.sphinx-doc....
pandas_user_guide/howtospeeduppythonpa_81_0.txt
python
pandas_user_guide/pandas_user_guide_27_72.txt
r@localhost:5432/mydatabase") engine = create_engine("mysql+mysqldb://scott:tiger@localhost/foo") engine = create_engine("oracle://scott:[[email protected]](/cdn-cgi/l/email-protection):1521/sidname") engine = create_engine("mssql+pyodbc://mydsn") # sqlite://<nohostname>/<path> #...
pandas_user_guide/pandas_user_guide_27_51.txt
here) 2917 raise TypeError( 2918 "cannot pass a column specification when reading " 2919 "a Fixed format store. this store must be selected in its entirety" 2920 ) 2921 if where is not None: -> 2922 raise TypeError( 2923 "cannot pass a wh...
pandas_user_guide/pandas_user_guide_22_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/howtospeeduppythonpa_24_0.txt
Next, we are going to create our dataset with some by creating some random data. Now your code will most likely rely on actual data but for our use case, we will create some arbitrary data.
pandas_user_guide/pandas_user_guide_10_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/vectorizationinpanda_7_0.txt
[ Sign in ](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fpython.plainenglish.io%2Fvectorization- in-pandas-simplifying-data-operations-3a4fda08a184&source=post_page--- two_column_layout_nav-----------------------global_nav-----------)
pandas_user_guide/pandas_user_guide_15_0.txt
Skip to main content __ Back to top __ ` Ctrl ` \+ ` K ` [ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html) Site Navigation * [ Getting started ](../getting_started/index.html) * [ User Guide ](index.html) * [ API reference ](../reference/index.html) * [ Development ](../develop...
pandas_user_guide/pandas_user_guide_24_26.txt
| 1.264506 | -0.032131 | -2.114907 | -0.264043 | 0.457835 | -0.676837 | -0.629003 | 0.489145 | -0.551686 | 0.942622 | -0.512043 | -0.455893 | 0.021244 | -0.178035 | -2.498073 | -0.171292 | 0.323510 | -0.545163 | -0.668909 | -0.150031 | 0.521620 | -0.428980 | 0.676463 | 0.3...
pandas_user_guide/pandas_user_guide_23_8.txt
NaN 5 11.0 6 13.0 7 NaN 8 NaN dtype: float64 In [146]: ser.interpolate(limit=1, limit_direction="both") Out[146]: 0 NaN 1 5.0 2 5.0 3 7.0 4 NaN 5 11.0 6 13.0 7 13.0 8 NaN dtype: float64 ...
pandas_user_guide/pandas_user_guide_10_13.txt
"Greens"); ![../_images/greens.png](../_images/greens.png) Parallel coordinates charts: In [209]: plt.figure(); In [210]: parallel_coordinates(data, "Name", colormap="gist_rainbow"); ![../_images/parallel_gist_rainbow.png](../_images/parallel_gist_rainbow.png) Andrews curves charts...
pandas_user_guide/howtospeeduppythonpa_60_0.txt
Whenever you’re writing functions on Pandas DataFrames, try to vectorize your calculations as much as possible. As datasets get larger and larger and your calculations get more and more complex, the time savings add up exponentially when you utilize vectorization. It's worth noting that not all operations can be vector...
pandas_user_guide/pandasvectorization_10_0.txt
import pandas as pd import numpy as np
pandas_user_guide/howtospeeduppythonpa_139_0.txt
The time it took to run is as follows:
pandas_user_guide/tutorialbasicvectori_0_0.txt
` `
pandas_user_guide/howtospeeduppythonpa_83_0.txt
deep learning
pandas_user_guide/pandas_user_guide_5_31.txt
ime64[s] 1 float32 1 bool 1 int8 1 Name: count, dtype: int64 Numeric dtypes will propagate and can coexist in DataFrames. If a dtype is passed (either directly via the ` dtype ` keyword, a passed ` ndarray ` , or a passed ` Series ` ), then it will be preserv...
pandas_user_guide/pandas_user_guide_2_7.txt
'2011-03-31', '2011-04-29', '2011-05-31', '2011-06-30', '2011-07-29', '2011-08-31', '2011-09-30', '2011-10-31', '2011-11-30', '2011-12-30'], dtype='datetime64[ns]', freq='BME') In [84]: pd.date_range(start, end, freq="W") Out[84]: DatetimeIndex(...
pandas_user_guide/vectorizationinpanda_35_0.txt
import pandas as pd
pandas_user_guide/pandas_user_guide_22_1.txt
tal. The implementation and parts of the API may change without warning. For backwards-compatibility, ` object ` dtype remains the default type we infer a list of strings to In [1]: pd.Series(["a", "b", "c"]) Out[1]: 0 a 1 b 2 c dtype: object To explicitly request ` ...
pandas_user_guide/pandas_user_guide_27_28.txt
reader: .....: print(chunk) .....: Empty DataFrame Columns: [] Index: [] a b 0 1 2 a b 1 3 4 Line-limited json can also be read using the pyarrow reader by specifying ` engine="pyarrow" ` . In [301]: from io import BytesIO In ...
pandas_user_guide/pandasvectorization_27_0.txt
one 2.5 two 2.5 dtype: float64
pandas_user_guide/howtospeeduppythonpa_89_0.txt
#### Managing Python Dependencies with Poetry vs Conda & Pip
pandas_user_guide/tutorialbasicvectori_50_0.txt
## 3\. Using iterrows()
pandas_user_guide/vectorizationinpanda_98_0.txt
[ Numpy ](https://medium.com/tag/numpy?source=post_page-----3a4fda08a184 ---------------numpy-----------------)
pandas_user_guide/pandas_user_guide_9_21.txt
In [237]: res = series2.reindex_like(series1) In [238]: res.dtype Out[238]: dtype('O') In [239]: res Out[239]: 0 True 1 NaN 2 NaN dtype: object This is because the (re)indexing operations above silently inserts ` NaNs ` and the ` dtype ` changes accordin...
pandas_user_guide/howtospeeduppythonpa_103_0.txt
## How to Speed Up Python Pandas by over 300x
pandas_user_guide/howtospeeduppythonpa_8_0.txt
[ ](https://twitter.com/intent/tweet?text=https://www.exxactcorp.com/blog/Deep- Learning/how-to-speed-up-python-pandas-by-over-300x) [ ](https://www.facebook.com/sharer/sharer.php?u=https://www.exxactcorp.com/blog/Deep- Learning/how-to-speed-up-python-pandas-by-over-300x) [ ](https://www.linkedin.com/shareArticle?mini=...
pandas_user_guide/vectorizationinpanda_67_0.txt
# **Efficiency Comparison: NumPy Vectorized vs. Traditional Loop-Based Element-Wise Addition**
pandas_user_guide/pandas_user_guide_27_12.txt
e an object-dtype column with strings, even with ` parse_dates ` . To parse the mixed-timezone values as a datetime column, read in as ` object ` dtype and then call [ ` to_datetime() ` ](../reference/api/pandas.to_datetime.html#pandas.to_datetime "pandas.to_datetime") with ` utc=True ` . In [120]: c...
pandas_user_guide/pandas_user_guide_19_4.txt
esult_type, args, by_row, engine, engine_kwargs, **kwargs) 10347 from pandas.core.apply import frame_apply 10349 op = frame_apply( 10350 self, 10351 func=func, (...) 10359 kwargs=kwargs, 10360 ) > 10361 return op.apply().__finalize__(self, method="apply") ...
pandas_user_guide/pandas_user_guide_26_10.txt
0.181231 1.732707 0.577569 1.366330 foo -1.796421 -0.359284 0.912265 2.824590 0.564918 0.884785 Note In general, the output column names should be unique, but pandas will allow you apply to the same function (or two functions with the same name) to the same column. In [108]: grouped["...
pandas_user_guide/howtospeeduppythonpa_51_0.txt
The time it took to run this function on our dataset is as follows:
pandas_user_guide/howtospeeduppythonpa_169_0.txt
##### Deep Learning
pandas_user_guide/pandas_user_guide_7_10.txt
t[86]: A B C 0 0.1040 0.1 0.0 1 0.1741 0.5 0.0 2 -0.4395 0.4 0.0 3 -0.7413 0.8 0.0 4 -0.0797 0.4 0.0 5 -0.9229 0.3 0.0 In [87]: pd.reset_option("colheader_justify") ## Number formatting # pandas also allows you to set how numbers are displayed i...
pandas_user_guide/vectorizationinpanda_101_0.txt
[ ](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fpython- in-plain- english%2F3a4fda08a184&operation=register&redirect=https%3A%2F%2Fpython.plainenglish.io%2Fvectorization- in-pandas-simplifying-data- operations-3a4fda08a184&user=Gaurav+Kumar&userId=f319c9e06fc1&source=-----3a4fda08a184 --...
pandas_user_guide/pandas_user_guide_27_59.txt
2 2002-09-25 1.242255 -0.055457 2002-09-26 0.410317 2.194489 [268 rows x 2 columns] ##### Selecting using a where mask # Sometime your query can involve creating a list of rows to select. Usually this ` mask ` would be a resulting ` index ` from an indexing operation. This example selects...
pandas_user_guide/vectorizationinpanda_123_0.txt
](https://medium.com/jobs-at-medium/work-at- medium-959d1a85284e?source=post_page----- 3a4fda08a184--------------------------------)
pandas_user_guide/vectorizationinpanda_118_0.txt
Status
pandas_user_guide/pandas_user_guide_25_23.txt
In [292]: df = pd.DataFrame(np.random.randn(8, 4), .....: index=dates, columns=['A', 'B', 'C', 'D']) .....: In [293]: df2 = df.copy() ## Duplicate data # If you want to identify and remove duplicate rows in a DataFrame, there are two methods that will help:...