pastebin
Add a new paste
View all pastes
Change language
Dutch
English
French
Russian
menu
URL Shortener
Multiple URL shortener
browser info
Whois IP and domain lookup
Capture a Website screenshot
Disqus Chatroom
Registration
pastebin
Paste Search Dynamic
Recent pastes
decryptMessage
12 hours ago
gn gen ide ninja executable
12 hours ago
pArr
12 hours ago
PDOCollector not found in
12 hours ago
raised to the power
12 hours ago
Fatal error
12 hours ago
sum
12 hours ago
XMLSerializer failed
12 hours ago
strlen arr
12 hours ago
failed to open stream
12 hours ago
DataFrame
import
pandas as pd
import
numpy as np
# Create a sample dataframe
df = pd.
DataFrame
(
{
'X'
:
[
78
,
85
,
96
,
80
,
86
]
,
'Y'
:
[
84
,
94
,
89
,
83
,
86
]
,
'Z'
:
[
86
,
97
,
96
,
72
,
83
]
}
)
# Raise the elements of the dataframe to the powers from the second array
powers = np.
array
(
[
2
,
3
,
4
,
5
,
6
]
)
result = np.
power
(
df, powers
[
:,
none
]
)
print
(
result
Parsed in 0.009 seconds