id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
pandas_user_guide/pandas_user_guide_2_12.txt | ny unspecified date
component in a ` DatetimeIndex ` in contrast to slicing which returns any
partially matching dates:
In [137]: rng2 = pd.date_range("2011-01-01", "2012-01-01", freq="W")
In [138]: ts2 = pd.Series(np.random.randn(len(rng2)), index=rng2)
In [139]: ts2.truncate(before="... | |
pandas_user_guide/pandas_user_guide_11_9.txt |
1 1 6 7 14
2 1 7 9 18
3 1 8 11 22
4 1 9 13 26
### [ ` eval() ` ](../reference/api/pandas.eval.html#pandas.eval
"pandas.eval") performance comparison #
[ ` pandas.eval() ` ](../reference/api/pandas.eval.html#pandas.eval
"pandas.eval") works well with expressions containing l... | |
pandas_user_guide/howtospeeduppythonpa_38_0.txt | %%timeit
df = get_data()
for index, row in df.iterrows():
df.loc[index, 'reward'] = reward_calc(row) | |
pandas_user_guide/howtospeeduppythonpa_19_0.txt | ## Our Dataset and Problem | |
pandas_user_guide/vectorizationinpanda_87_0.txt | www.quizshorts.actopiagames.com | |
pandas_user_guide/pandas_user_guide_26_16.txt | methods.
Filtrations will respect subsetting the columns of the GroupBy object.
In [177]: speeds.groupby("class")[["order", "max_speed"]].nth(1)
Out[177]:
order max_speed
parrot Psittaciformes 24.0
monkey Primates NaN
### Built-in filtratio... | |
pandas_user_guide/pandas_user_guide_16_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../index.html)
Site Navigation
* [ Getting started ](../getting_started/index.html)
* [ User Guide ](index.html)
* [ API reference ](../reference/index.html)
* [ Development ](../develop... | |
pandas_user_guide/pandasvectorization_42_0.txt | * * * | |
pandas_user_guide/howtospeeduppythonpa_23_0.txt | import pandas as pd
import numpy as np | |
pandas_user_guide/vectorizationinpanda_36_0.txt | data = {'A': [1, 2, 3]}
df = pd.DataFrame(data)
# Define a custom function
def square(x):
return x ** 2 | |
pandas_user_guide/pandas_user_guide_10_10.txt | t and targeting multiple axes #
The layout of subplots can be specified by the ` layout ` keyword. It can
accept ` (rows, columns) ` . The ` layout ` keyword can be used in ` hist
` and ` boxplot ` also. If the input is invalid, a ` ValueError ` will be
raised.
The number of axes which can be contained by rows... | |
pandas_user_guide/pandas_user_guide_17_4.txt | using the attributes ` days,seconds,microseconds,nanoseconds ` .
These are identical to the values returned by ` datetime.timedelta ` , in
that, for example, the ` .seconds ` attribute represents the number of
seconds >= 0 and < 1 day. These are signed according to whether the `
Timedelta ` is signed.
These opera... | |
pandas_user_guide/howtospeeduppythonpa_158_0.txt | [ Configure Now ](/category/Deep-Learning-AI-Servers) | |
pandas_user_guide/vectorizationinpanda_28_0.txt | Consider a DataFrame with two columns, ‘A’ and ‘B’, and we want to add these
two columns element-wise and store the result in a new column ‘C’. With
vectorization, you can achieve this in a single line of code: | |
pandas_user_guide/pandas_user_guide_5_35.txt | _aware_dates"] = pd.date_range("20130101", periods=3, tz="US/Eastern")
In [435]: df
Out[435]:
string int64 uint8 ... uint64 other_dates tz_aware_dates
0 a 1 3 ... 3 2013-01-01 2013-01-01 00:00:00-05:00
1 b 2 4 ... 4 2013-01-02 2... | |
pandas_user_guide/pandas_user_guide_20_2.txt | ference/api/pandas.pivot_table.html#pandas.pivot_table
"pandas.pivot_table") .
### [ ` pivot_table() `
](../reference/api/pandas.pivot_table.html#pandas.pivot_table
"pandas.pivot_table") #
While [ ` pivot() `
](../reference/api/pandas.DataFrame.pivot.html#pandas.DataFrame.pivot
"pandas.DataFrame.pivot") provides g... | |
pandas_user_guide/vectorizationinpanda_116_0.txt | Help | |
pandas_user_guide/pandas_user_guide_2_38.txt | atetime64[ns, US/Eastern]', freq=None)
### Nonexistent times when localizing #
A DST transition may also shift the local time ahead by 1 hour creating
nonexistent local times (âclocks spring forwardâ). The behavior of
localizing a timeseries with nonexistent times can be controlled by the `
nonexistent ` ... | |
pandas_user_guide/pandas_user_guide_7_9.txt | 4 4 7 non-null float64
5 5 6 non-null float64
6 6 2 non-null float64
7 7 6 non-null float64
8 8 6 non-null float64
9 9 6 non-null float64
dtypes: float64(10)
memory usage: 928.0 bytes
In [68]: pd.... | |
pandas_user_guide/pandas_user_guide_14_7.txt | a 1.0 False bar
b 2.0 False bar
c 3.0 True bar
d NaN False bar
When inserting a [ ` Series `
](../reference/api/pandas.Series.html#pandas.Series "pandas.Series") that does
not have the same index as the [ ` DataFrame `
](../reference/api/pandas.DataFrame.html#pandas.DataFrame "panda... | |
pandas_user_guide/pandas_user_guide_10_1.txt | ormat the x-axis nicely as per above.
On DataFrame, [ ` plot() `
](../reference/api/pandas.DataFrame.plot.html#pandas.DataFrame.plot
"pandas.DataFrame.plot") is a convenience to plot all of the columns with
labels:
In [7]: df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list("ABCD")... | |
pandas_user_guide/howtospeeduppythonpa_0_0.txt | [  ](/) | |
pandas_user_guide/pandas_user_guide_2_39.txt | /Warsaw]', freq=None)
In [493]: dti.tz_localize("Europe/Warsaw", nonexistent="NaT")
Out[493]:
DatetimeIndex(['NaT', '2015-03-29 03:30:00+02:00',
'2015-03-29 04:30:00+02:00'],
dtype='datetime64[ns, Europe/Warsaw]', freq=None)
### Time zone Series operations ... | |
pandas_user_guide/pandas_user_guide_20_10.txt | pd.DataFrame({"A": list("abc"), "B": [1.1, 2.2, 3.3]})
In [86]: pd.get_dummies(df, dtype=np.float32).dtypes
Out[86]:
B float64
A_a float32
A_b float32
A_c float32
dtype: object
New in version 1.5.0.
[ ` from_dummies() `
](../reference/api/pandas.from_dummies.html#... | |
pandas_user_guide/pandas_user_guide_24_16.txt | -|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|--... | |
pandas_user_guide/vectorizationinpanda_125_0.txt | ](https://blog.medium.com/?source=post_page-----
3a4fda08a184--------------------------------) | |
pandas_user_guide/tutorialbasicvectori_47_0.txt | ## 2\. Vectorization | |
pandas_user_guide/tutorialbasicvectori_51_0.txt | The iterrows() method allows you to iterate over rows in a DataFrame, and you
can apply custom functions to each row. However, it is not as efficient as
vectorized operations for large datasets. | |
pandas_user_guide/vectorizationinpanda_74_0.txt | # Measure execution time for traditional loop-based approach
loop_time = timeit.timeit(loop_based, number=100) | |
pandas_user_guide/pandas_user_guide_19_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../index.html)
Site Navigation
* [ Getting started ](../getting_started/index.html)
* [ User Guide ](index.html)
* [ API reference ](../reference/index.html)
* [ Development ](../develop... | |
pandas_user_guide/pandasvectorization_30_0.txt |
Out[61]: | |
pandas_user_guide/pandas_user_guide_2_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../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_26_14.txt |
In [142]: compare.plot()
Out[142]: <Axes: >

Transformation functions that have lower dimension outputs are broadcast to
match the shape of the input array.
In [143]: ts.groupby(lambda x: x.year).transform(lam... | |
pandas_user_guide/vectorizationinpanda_21_0.txt | Listen | |
pandas_user_guide/pandas_user_guide_12_3.txt | {"foo": [1, 2, 3], "bar": [4, 5, 6]})
....: df["foo"][df["bar"] > 5] = 100
....: df
....:
The column ` foo ` is updated where the column ` bar ` is greater than 5.
This violates the CoW principles though, because it would have to modify the
view ` df["foo"] ` and ` df ` in one st... | |
pandas_user_guide/pandas_user_guide_27_10.txt | rint(data)
a,b,c
4,apple,bat,
8,orange,cow,
In [98]: pd.read_csv(StringIO(data))
Out[98]:
a b c
4 apple bat NaN
8 orange cow NaN
In [99]: pd.read_csv(StringIO(data), index_col=False)
Out[99]:
a b c
0 4 apple bat
1 8 oran... | |
pandas_user_guide/vectorizationinpanda_121_0.txt | ](https://medium.com/about?autoplay=1&source=post_page-----
3a4fda08a184--------------------------------) | |
pandas_user_guide/pandas_user_guide_7_11.txt | nce __ ](enhancingperf.html "next page")
__ On this page
* Overview
* Available options
* Getting and setting options
* Setting startup options in Python/IPython environment
* Frequently used options
* Number formatting
* Unicode formatting
* Table schema display
[ __ Show Source ](../_sourc... | |
pandas_user_guide/howtospeeduppythonpa_1_0.txt | * Blog | |
pandas_user_guide/pandas_user_guide_0_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../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_27_75.txt | pss.html#pandas.read_spss "pandas.read_spss")
can read (but not write) SPSS SAV (.sav) and ZSAV (.zsav) format files.
SPSS files contain column names. By default the whole file is read,
categorical columns are converted into ` pd.Categorical ` , and a ` DataFrame
` with all columns is returned.
Specify the ` usecols... | |
pandas_user_guide/pandasvectorization_18_0.txt | # dictionary
d = {
'one': one,
'two': two
} | |
pandas_user_guide/pandas_user_guide_22_8.txt | two_groups)
In [127]: extractall_result
Out[127]:
letter digit
match
0 0 a 3
1 0 b 3
2 0 c 2
In [128]: extractall_result.xs(0, level="match")
Out[128]:
letter digit
0 a 3
1 b 3
... | |
pandas_user_guide/howtospeeduppythonpa_181_0.txt | deep learning | |
pandas_user_guide/pandas_user_guide_2_27.txt | 46
[6 rows x 6 columns]
By passing a dict to ` aggregate ` you can apply a different aggregation to
the columns of a ` DataFrame ` :
In [322]: r.agg({"A": "sum", "B": lambda x: np.std(x, ddof=1)})
Out[322]:
A B
2012-01-01 00:00:00 -6.088... | |
pandas_user_guide/vectorizationinpanda_0_0.txt | [ Open in app
](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2F3a4fda08a184&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderCollection&source=---two_column_layout_nav----------------------------------) | |
pandas_user_guide/pandas_user_guide_27_1.txt | to_parquet
binary | [ ORC Format ](https://orc.apache.org/) | read_orc | to_orc
binary | [ Stata ](https://en.wikipedia.org/wiki/Stata) | read_stata | to_stata
binary | [ SAS ](https://en.wikipedia.org/wiki/SAS_\(software\)) | read_sas |
binary | [ SPSS ](https://en.wikipedia.org/wiki/SPSS... | |
pandas_user_guide/pandas_user_guide_14_11.txt |
In [114]: ser1
Out[114]:
a 1
b 2
c 3
dtype: int64
In [115]: ser2
Out[115]:
b 1
a 3
c 5
dtype: int64
In [116]: np.remainder(ser1, ser2)
Out[116]:
a 1
b 0
c 3
dtype: int64
As usual, the union of the t... | |
pandas_user_guide/pandas_user_guide_24_12.txt | ]:
| A | B | C | D
---|---|---|---|---
0 | 1.764052 | 0.400157 | nan | 2.240893
1 | 1.867558 | -0.977278 | 0.950088 | -0.151357
2 | -0.103219 | 0.410599 | 0.144044 | 1.454274
3 | 0.761038 | 0.121675 | 0.443863 | 0.333674
4 | 1.494079 | -0.205158 | 0.31... | |
pandas_user_guide/howtospeeduppythonpa_101_0.txt |  | |
pandas_user_guide/vectorizationinpanda_66_0.txt | With NumPy, you perform the operation on entire arrays at once, and NumPy
handles the underlying details efficiently. | |
pandas_user_guide/pandas_user_guide_8_12.txt | optional filling of missing data with ` fill_method ` .
In [134]: left = pd.DataFrame(
.....: {"k": ["K0", "K1", "K1", "K2"], "lv": [1, 2, 3, 4], "s": ["a", "b", "c", "d"]}
.....: )
.....:
In [135]: right = pd.DataFrame({"k": ["K1", "K2", "K4"], "rv": [1, 2, 3]})
... | |
pandas_user_guide/pandas_user_guide_4_4.txt | an ordered ` Categorical ` .
Note
The result of [ ` unique() `
](../reference/api/pandas.Series.unique.html#pandas.Series.unique
"pandas.Series.unique") is not always the same as ` Series.cat.categories ` ,
because ` Series.unique() ` has a couple of guarantees, namely that it
returns categories in the order of ... | |
pandas_user_guide/howtospeeduppythonpa_145_0.txt | The time it took to run this function on our dataset is as follows: | |
pandas_user_guide/pandas_user_guide_22_4.txt | re.sub "\(in Python v3.12\)") .
The callable should expect one positional argument (a regex object) and return
a string.
# Reverse every lowercase alphabetic word
In [54]: pat = r"[a-z]+"
In [55]: def repl(m):
....: return m.group(0)[::-1]
....:
In [56]: pd.Series... | |
pandas_user_guide/pandas_user_guide_24_21.txt | 1.219296 | 0.400863 | 0.591165 | -1.485213 | 1.501979 | 1.196569 | -0.214154 | 0.339554 | -0.034446 | 1.176452 | 0.546340 | -1.255630 | -1.309210 | -0.445437 | 0.189437 | -0.737463 | 0.843767 | -0.605632 | -0.060777 | 0.409310 | 1.285569 | -0.622638 | 1.018193 | 0.880680 ... | |
pandas_user_guide/howtospeeduppythonpa_131_0.txt | Looping and Iterating is the most basic way to deliver the same calculation
row by row. We call the data frame and iterate rows with a new cell called
reward and run the calculation to fill in the new ‘reward’ according to our
previously defined ‘reward_calc’ code block. This is the most basic and
probably the first me... | |
pandas_user_guide/tutorialbasicvectori_7_0.txt | ## Welcome back | |
pandas_user_guide/pandas_user_guide_9_9.txt | df.rename(index={"one": "two", "y": "z"})
Out[93]:
0 1
two z 1.519970 -0.493662
x 0.600178 0.274230
zero z 0.132885 -0.023688
x 2.410179 1.450520
The [ ` rename_axis() `
](../reference/api/pandas.DataFrame.rename_axis.html#pandas.DataFrame.rename_a... | |
pandas_user_guide/tutorialbasicvectori_52_0.txt | While iterrows() can be convenient for specific cases, it is less efficient
than vectorization because it requires iteration over rows. | |
pandas_user_guide/tutorialbasicvectori_35_0.txt | In this tutorial, we will explore the concept of **vectorization** and compare
it with two common alternatives, **iterrows()** and **apply()** , in the
context of working with data in Pandas. We will also assess the performance
differences between these methods to understand when to use each. | |
pandas_user_guide/howtospeeduppythonpa_126_0.txt | With the latest CPUs and most powerful GPUs available, accelerate your deep
learning and AI project optimized to your deployment, budget, and desired
performance! | |
pandas_user_guide/pandas_user_guide_14_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../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_82_0.txt | Vectorization offers several advantages for speeding up your code: | |
pandas_user_guide/vectorizationinpanda_3_0.txt | [
](https://medium.com/?source=---two_column_layout_nav----------------------------------) | |
pandas_user_guide/pandas_user_guide_14_9.txt | mn and row
labels.
In [94]: df = pd.DataFrame(np.random.randn(10, 4), columns=["A", "B", "C", "D"])
In [95]: df2 = pd.DataFrame(np.random.randn(7, 3), columns=["A", "B", "C"])
In [96]: df + df2
Out[96]:
A B C D
0 0.045691 -0.014138 1.380871 NaN... | |
pandas_user_guide/howtospeeduppythonpa_136_0.txt | ### Apply | |
pandas_user_guide/pandas_user_guide_8_2.txt | hen concatenating [ ` DataFrame `
](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame")
with named axes, pandas will attempt to preserve these index/column names
whenever possible. In the case where all inputs share a common name, this name
will be assigned to the result. When the input names d... | |
pandas_user_guide/pandas_user_guide_9_11.txt | n self.obj._slice(indexer, axis=axis)
File ~/work/pandas/pandas/pandas/core/indexes/base.py:6662, in Index.slice_indexer(self, start, end, step)
6618 def slice_indexer(
6619 self,
6620 start: Hashable | None = None,
6621 end: Hashable | None = None,
6622 step:... | |
pandas_user_guide/pandas_user_guide_26_21.txt | nth(-1)
Out[239]:
A B
1 1 4.0
2 5 6.0
In [240]: g.nth(1)
Out[240]:
A B
1 1 4.0
If the nth element of a group does not exist, then no corresponding row is
included in the result. In particular, if the specified ` n ` is larger than
any group, the result wil... | |
pandas_user_guide/howtospeeduppythonpa_54_0.txt | ## Why Vectorization in Pandas is over 300x Faster | |
pandas_user_guide/pandas_user_guide_23_4.txt | s") or [ `
DataFrame ` ](../reference/api/pandas.DataFrame.html#pandas.DataFrame
"pandas.DataFrame") . The missing value sentinel used will be chosen based on
the dtype.
In [57]: ser = pd.Series([1., 2., 3.])
In [58]: ser.loc[0] = None
In [59]: ser
Out[59]:
0 NaN
1 2... | |
pandas_user_guide/tutorialbasicvectori_40_0.txt | 4. Using apply() | |
pandas_user_guide/howtospeeduppythonpa_129_0.txt | To time our functions, we will be using a Jupyter Notebook to make it
relatively simple with the magic function %%timeit. There are other ways to
time a function in Python but for demonstration purposes, our Jupyter Notebook
will suffice. We will do a demo run on the same dataset with 3 ways of
calculating and evaluati... | |
pandas_user_guide/vectorizationinpanda_58_0.txt | Output:
[7, 9, 11, 13, 15] | |
pandas_user_guide/pandas_user_guide_5_13.txt | ----------------------------------------------
Intercept -8484.7720 4664.146 -1.819 0.074 -1.78e+04 835.780
C(lg)[T.NL] -2.2736 1.325 -1.716 0.091 -4.922 0.375
ln_h -1.3542 0.875 -1.547 0.127 -3.103 0.395
year 4... | |
pandas_user_guide/pandas_user_guide_8_11.txt | , "K1", "K2"], name="key1")
In [123]: left = pd.DataFrame(
.....: {
.....: "A": ["A0", "A1", "A2", "A3"],
.....: "B": ["B0", "B1", "B2", "B3"],
.....: "key2": ["K0", "K1", "K0", "K1"],
.....: },
.....: index=left_index,
.....:... | |
pandas_user_guide/pandas_user_guide_3_6.txt | 2]: df.mean(axis=1)
Out[62]:
2013-01-01 0.872735
2013-01-02 1.431621
2013-01-03 0.707731
2013-01-04 1.395042
2013-01-05 1.883656
2013-01-06 1.592306
Freq: D, dtype: float64
Operating with another [ ` Series `
](../reference/api/pandas.Series.html#pandas.Series "... | |
pandas_user_guide/howtospeeduppythonpa_149_0.txt | The reason why vectorization is so much faster than Looping/Iterating and
Apply is that it doesn’t calculate the entire row every single time but
instead applies the parameters to the entire dataset as a whole. Vectorization
is a process where operations are applied to entire arrays of data at once,
instead of operatin... | |
pandas_user_guide/pandas_user_guide_27_2.txt | ader row, then you should
explicitly pass ` header=None ` . Duplicates in this list are not allowed.
index_col int, str, sequence of int / str, or False, optional, default ` None
`
Column(s) to use as the row labels of the ` DataFrame ` , either given as
string name or column index. If a sequence of int / st... | |
pandas_user_guide/howtospeeduppythonpa_4_0.txt | * Reference Architecture | |
pandas_user_guide/howtospeeduppythonpa_36_0.txt | ### Looping/Iterating | |
pandas_user_guide/howtospeeduppythonpa_90_0.txt | March 7, 2024 9 min read ](/blog/Deep-Learning/managing-python-dependencies-
with-poetry-vs-conda-pip) | |
pandas_user_guide/howtospeeduppythonpa_52_0.txt | 10.4 ms ± 76.2 µs per loop (mean ± std. dev. of 7 runs, 100 loops each) | |
pandas_user_guide/pandas_user_guide_9_19.txt | -> 6804 raise err
6806 if isinstance(slc, np.ndarray):
6807 # get_loc may return a boolean array, which
6808 # is OK as long as they are representable by a slice.
6809 assert is_bool_dtype(slc.dtype)
File ~/work/pandas/pandas/pandas/core/indexes/base.py:6798, ... | |
pandas_user_guide/tutorialbasicvectori_28_0.txt | ### Duc Lai Trung Minh | |
pandas_user_guide/pandas_user_guide_8_0.txt | Skip to main content
__ Back to top
__ ` Ctrl ` \+ ` K `
[  ](../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_5_0.txt | Create your free account or sign in to continue your search | |
pandas_user_guide/howtospeeduppythonpa_100_0.txt | We’re developing this blog to help engineers, developers, researchers, and
hobbyists on the cutting edge cultivate knowledge, uncover compelling new
ideas, and find helpful instruction all in one place. | |
pandas_user_guide/pandas_user_guide_24_24.txt | 1 | -0.669567 | 0.601618 | 0.503656 | -0.678253 | -2.907108 | -1.717123 | 0.397631 | 1.300108 | 0.215821 | -0.593075 | -0.225944 | -0.946057 | 1.000308 | 0.393160 | 1.342074 | -0.370687 | -0.166413 | -0.419814 | -0.255931 | 1.789478 | 0.282378 | 0.742260 | -0.050498 | 1.4... | |
pandas_user_guide/vectorizationinpanda_100_0.txt | \-- | |
pandas_user_guide/pandas_user_guide_27_19.txt | ite(data)
.....:
In [220]: pd.read_csv("mi2.csv", header=[0, 1], index_col=0)
Out[220]:
a b c
q r s t u v
one 1 2 3 4 5 6
two 7 8 9 10 11 12
Note
If an ` index_col ` is not specified (e.g. you donât have an index, or
wrote it... | |
pandas_user_guide/howtospeeduppythonpa_138_0.txt | %%timeit
df = get_data()
df['reward'] = df.apply(reward_calc, axis=1) | |
pandas_user_guide/howtospeeduppythonpa_114_0.txt | ### The Data | |
pandas_user_guide/pandas_user_guide_24_23.txt | | -2.497026 | 0.631545 | 0.321418 | -0.425549 | -1.078832 | 0.753444 | 0.199790 | -0.360526 | -0.013448 | -0.819476 | 0.814869 | 0.442118 | -0.972048 | -0.060603 | -2.349825 | 1.265445 | -0.573257 | 0.429124 | 1.049783 | 1.954773 | 0.071883 | -0.094209 | 0.265616 | 0.948... | |
pandas_user_guide/pandas_user_guide_8_9.txt | B1", "B2", "B3"],
....: "key": ["K0", "K1", "K0", "K1"],
....: }
....: )
....:
In [92]: right = pd.DataFrame({"C": ["C0", "C1"], "D": ["D0", "D1"]}, index=["K0", "K1"])
In [93]: result = left.join(right, on="key")
In [94]: result
Out[94]:
... | |
pandas_user_guide/tutorialbasicvectori_80_0.txt | * [ Sales ](https://www.linkedin.com/pulse/topics/sales-s5/)
* [ Marketing ](https://www.linkedin.com/pulse/topics/marketing-s2461/)
* [ Business Administration ](https://www.linkedin.com/pulse/topics/business-administration-s50111/)
* [ HR Management ](https://www.linkedin.com/pulse/topics/hr-management-s50359/)
* [ C... | |
pandas_user_guide/howtospeeduppythonpa_92_0.txt | ##### Deep Learning | |
pandas_user_guide/howtospeeduppythonpa_30_0.txt |  | |
pandas_user_guide/pandas_user_guide_13_6.txt | the DataFrame with the passed Series, thus returning a DataFrame.
* [ ` DataFrame ` ](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame") / [ ` DataFrame ` ](../reference/api/pandas.DataFrame.html#pandas.DataFrame "pandas.DataFrame") : by default compute the statistic for matching column ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.