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
iptv
22 minutes ago
decryptMessage
14 hours ago
gn gen ide ninja executable
14 hours ago
pArr
14 hours ago
PDOCollector not found in
14 hours ago
raised to the power
14 hours ago
Fatal error
14 hours ago
sum
14 hours ago
XMLSerializer failed
14 hours ago
strlen arr
14 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.008 seconds