Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

shift axis in python

# To adjust coordinate labels or make axis cyclic or periodic,
# you can use the Shift() and/or roll() methods as shown below:

import xarray as xr


array = xr.DataArray([1, 2, 3, 4], dims="x")

# shift the coordinate 'x' (to the right) by 2
array.shift(x=2)

# roll the coordinate 'x' (toward the right) by 2
array.roll(x=2, roll_coords=True)

Comment

PREVIOUS NEXT
Code Example
Python :: How to get the current user email from the account logged in? odoo 
Python :: how to make a forever loop in python 
Python :: openpyxl delete column by name 
Python :: convert any base to decimal python 
Python :: convert excel to csv using python 
Python :: clock in python 
Python :: pandas to pickle 
Python :: python to golang 
Python :: log of number python 
Python :: pandas groupby count occurrences 
Python :: how to record the steps of mouse and play the steps using python 
Python :: python inspect source code 
Python :: python virus 
Python :: pandas change every row to df 
Python :: empty directory if not empty python 
Python :: pandas to csv float format 
Python :: how to write to a file in python without deleting all content 
Python :: pandas filter on range of values 
Python :: convert number to binary in python 
Python :: how to write a numpy array to a file in python 
Python :: django filter text first character upper case 
Python :: what is my python working directory 
Python :: plt.savefig 
Python :: python program to display the current date and time 
Python :: how to delete nan values in python 
Python :: delete unnamed coloumns in pandas 
Python :: How to get current CPU and RAM usage in Python? 
Python :: open mat python 
Python :: python join list to string 
Python :: python- find multiple values in a column 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =