Hello! I'm using a laptop with Arch Linux
I have been trying to change the refresh rate from my laptop (144 Hz to 60 Hz) using:
xrandr --output eDP-1 --mode 1920x1080 --rate 60
But when I run that, I get this:
xrandr: Configure crtc 0 failed
I have already checked that said refresh rate is supported by my monitor:
xrandr -q
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 144.00*+ 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1400x1050 74.76 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 85.02 75.02 60.02
1400x900 59.96 59.88
1280x960 85.00 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1152x864 75.00
1280x720 60.00 59.99 59.86 59.74
1024x768 85.00 75.05 60.04 85.00 75.03 70.07 60.00
1024x768i 86.96
960x720 85.00 75.00 60.00
928x696 75.00 60.05
896x672 75.05 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
832x624 74.55
960x540 59.96 59.99 59.63 59.82
800x600 85.00 75.00 70.00 65.00 60.00 85.14 72.19 75.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 74.76 59.98
800x450 59.95 59.82
640x512 85.02 75.02 60.02
700x450 59.96 59.88
640x480 85.09 60.00 85.01 72.81 75.00 59.94
720x405 59.51 58.99
720x400 85.04
684x384 59.88 59.85
640x400 59.88 59.98 85.08
576x432 75.00
640x360 59.86 59.83 59.84 59.32
640x350 85.08
512x384 85.00 75.03 70.07 60.00
512x384i 87.06
512x288 60.00 59.92
416x312 74.66
480x270 59.63 59.82
400x300 85.27 72.19 75.12 60.32 56.34
432x243 59.92 59.57
320x240 85.18 72.81 75.00 60.05
360x202 59.51 59.13
360x200 85.04
320x200 85.27
320x180 59.84 59.32
320x175 85.27)
I even specified the crtc, but I keep getting the same (xrandr: Configure crtc 0 failed) error
xrandr --output eDP-1 --crtc 0 --mode 1920x1080 --rate 60.00
Even changing to a resolution that is not 1920x1080 gives me the same error, any ideas?
try this
xrandr --output eDP-1 --rate 60.00 --mode 1920x1080
This morning, I updated all of my packets
pacman -Syu
Unexpectedly solving the error
Related
I have a DataFrame multiData that looks like this:
print(multiData)
Date Open High Low Close Adj Close Volume
Ticker Date
AAPL 0 2010-01-04 7.62 7.66 7.59 7.64 6.51 493729600
1 2010-01-05 7.66 7.70 7.62 7.66 6.52 601904800
2 2010-01-06 7.66 7.69 7.53 7.53 6.41 552160000
3 2010-01-07 7.56 7.57 7.47 7.52 6.40 477131200
4 2010-01-08 7.51 7.57 7.47 7.57 6.44 447610800
... ... ... ... ... ... ... ...
META 2668 2022-12-23 116.03 118.18 115.54 118.04 118.04 17796600
2669 2022-12-27 117.93 118.60 116.05 116.88 116.88 21392300
2670 2022-12-28 116.25 118.15 115.51 115.62 115.62 19612500
2671 2022-12-29 116.40 121.03 115.77 120.26 120.26 22366200
2672 2022-12-30 118.16 120.42 117.74 120.34 120.34 19492100
I need to get rid of "Date 0, 1, 2, ..." column and make the actual "Date" column part of the (multi) index
How do I do this?
Use df.droplevel to delete level 1 and chain df.set_index to add column Date to the index by setting the append parameter to True.
df = df.droplevel(1).set_index('Date', append=True)
df
Open High Low Close Adj Close Volume
Ticker Date
AAPL 2010-01-04 7.62 7.66 7.59 7.64 6.51 493729600
2010-01-05 7.66 7.70 7.62 7.66 6.52 601904800
I am collecting data from yahoo, it works fine for more than 3 months. Then in last week I noticed that datas from 22.4.2021 is missing till today.
When I print the stockData, here is the last records :
...
...
2021-04-20 7.52 7.07 7.35 7.13 4119197.0 7.13
2021-04-21 7.36 7.13 7.16 7.25 3110870.0 7.25
2021-04-22 7.73 7.10 7.22 7.59 13178439.0 7.59
2021-05-06 10.08 9.48 9.52 9.93 2753885.0 9.93
As you see, datas are missing. It's because of yahoo or panda function, Could you help me to fix it ?.
Alper
Dear friends i want to transpose the following dataframe into a single column. I cant figure out a way to transform it so your help is welcome!! I tried pivottable but sofar no succes
X 0.00 1.25 1.75 2.25 2.99 3.25
X 3.99 4.50 4.75 5.25 5.50 6.00
X 6.25 6.50 6.75 7.50 8.24 9.00
X 9.50 9.75 10.25 10.50 10.75 11.25
X 11.50 11.75 12.00 12.25 12.49 12.75
X 13.25 13.99 14.25 14.49 14.99 15.50
and it should look like this
X
0.00
1.25
1.75
2.25
2.99
3.25
3.99
4.5
4.75
5.25
5.50
6.00
6.25
etc..
This will do it, df.columns[0] is used as I don't know what are your headers:
df = pd.DataFrame({'X': df.set_index(df.columns[0]).stack().reset_index(drop=True)})
df
X
0 0.00
1 1.25
2 1.75
3 2.25
4 2.99
5 3.25
6 3.99
7 4.50
8 4.75
9 5.25
10 5.50
11 6.00
12 6.25
13 6.50
14 6.75
15 7.50
16 8.24
17 9.00
18 9.50
19 9.75
20 10.25
21 10.50
22 10.75
23 11.25
24 11.50
25 11.75
26 12.00
27 12.25
28 12.49
29 12.75
30 13.25
31 13.99
32 14.25
33 14.49
34 14.99
35 15.50
ty so much!! A follow up question(a)
Is it also possible to stack the df into 2 columns X and Y
this is the data set
This is the data set.
1 2 3 4 5 6 7
X 0.00 1.25 1.75 2.25 2.99 3.25
Y -1.08 -1.07 -1.07 -1.00 -0.81 -0.73
X 3.99 4.50 4.75 5.25 5.50 6.00
Y -0.37 -0.20 -0.15 -0.17 -0.15 -0.16
X 6.25 6.50 6.75 7.50 8.24 9.00
Y -0.17 -0.18 -0.24 -0.58 -0.93 -1.24
X 9.50 9.75 10.25 10.50 10.75 11.25
Y -1.38 -1.42 -1.51 -1.57 -1.64 -1.75
X 11.50 11.75 12.00 12.25 12.49 12.75
Y -1.89 -2.00 -2.00 -2.04 -2.04 -2.10
X 13.25 13.99 14.25 14.49 14.99 15.50
Y -2.08 -2.13 -2.18 -2.18 -2.27 -2.46
i got a panel data,how can i get the dataframe without Multiindex,i try to do this
print k_data
<class 'pandas.core.panel.Panel'>
Dimensions: 6 (items) x 480 (major_axis) x 100 (minor_axis)
Items axis: close to volume
Major_axis axis: 2018-08-13 09:35:00 to 2018-08-24 15:00:00
Minor_axis axis: 603105.XSHG to 600236.XSHG
print k_data.to_frame()
close high low money open \
major minor
2018-08-13 09:35:00 603105.XSHG 25.20 26.00 23.65 367025532.0 23.80
300745.XSHE 56.85 56.88 56.03 27557052.0 56.47
300746.XSHE 24.80 24.92 24.40 25316020.0 24.92
300747.XSHE 156.77 157.01 155.11 74177868.0 155.67
002932.XSHE 77.77 77.77 76.52 47234204.0 77.00
603045.XSHG 45.48 45.49 45.00 12387785.0 45.00
how to reindex columns like this
major minor close high low money open volume
2018/8/3 9:31 603105.XSHG 24.2 24.44 24.2 75700508 24.3 3111000
2018/8/3 9:31 300745.XSHE 62.06 62.31 61.46 25664428 61.46 415385
2018/8/3 9:31 300746.XSHE 28.6 28.74 28.54 4479504 28.74 156300
2018/8/3 9:31 300747.XSHE 181.2 181.39 180.85 11388640 181.39 62900
ok,i figure out the question
use k_data.to_frame().reset_index() to reset like this:
df = k_data.to_frame().reset_index()
print df
major minor close high low money \
0 2018-08-13 09:35:00 603105.XSHG 25.20 26.00 23.65 367025532.0
1 2018-08-13 09:35:00 300745.XSHE 56.85 56.88 56.03 27557052.0
2 2018-08-13 09:35:00 300746.XSHE 24.80 24.92 24.40 25316020.0
3 2018-08-13 09:35:00 300747.XSHE 156.77 157.01 155.11 74177868.0
4 2018-08-13 09:35:00 002932.XSHE 77.77 77.77 76.52 47234204.0
5 2018-08-13 09:35:00 603045.XSHG 45.48 45.49 45.00 12387785.0
6 2018-08-13 09:35:00 601330.XSHG 15.24 15.27 14.93 31972260.0
Given that I have the following dataset in TempTable:
Item Item Desc Location Qty LeasedQty
----------------------------------------------------------------
IT2250 1/2CANTOP NYC 1.00 30.00
IT5550 FCM 2K NYC 6.00 8.00
IT2075 HPTL 750 LA 4.00 44.00
IT12506 DOUBLE DOOR 10" CALI 60.00 0.00
IT3606 BAG180 CALI 25.00 0.00
IT3606 BAG180 NYC 20.00 40.00
IT3606 BAG180 LA 5.00 45.00
IT50 2K NYC 6.00 8.00
IT50 2K LA 4.00 44.00
IT50 2K CALI 60.00 0.00
How can I partition this data so that It will be Like the following:
Item Item Desc Location Qty LeasedQty RNK
----------------------------------------------------------------------
IT2250 1/2CANTOP NYC 1.00 30.00 1
IT5550 FCM 2K NYC 6.00 8.00 2
IT2075 HPTL 750 LA 4.00 44.00 3
IT12506 DOUBLE DOOR 10" CALI 60.00 0.00 4
IT3606 BAG180 CALI 25.00 0.00 5
IT3606 BAG180 NYC 20.00 40.00 5
IT3606 BAG180 LA 5.00 45.00 5
IT50 2K NYC 6.00 8.00 6
IT50 2K LA 4.00 44.00 6
IT50 2K CALI 60.00 0.00 6
Basically, I want the data to group by each item and gather the TOP 20 items based on the QTY (DESCENDING)
To get that rank this will help you
SELECT Dense_rank()
OVER (
ORDER BY Item) rnk,
*
FROM TempTable
Added to get top 20 records
SELECT TOP 20 *
FROM (SELECT Dense_rank()
OVER (
ORDER BY Item,qty desc) rnk,
*
FROM TempTable) a
WHERE rnk <= 20