IIUC:
ax = df.plot('Date','A')
ax1 = ax.twinx()
df.plot('Date','B',ax=ax1, color="r")
Output:
Or you can use secondary_y
in Pandas plot:
ax = df.plot('Date','A')
df.plot('Date','B',secondary_y=True, ax=ax)
Output:
More Related Contents:
- How to iterate over columns of pandas dataframe to run regression
- Add numpy array as column to Pandas data frame
- Stratified Sampling in Pandas
- Is .ix() always better than .loc() and .iloc() since it is faster and supports integer and label access?
- How to update values in a specific row in a Python Pandas DataFrame?
- Pandas: Modify a particular level of Multiindex
- Add column of empty lists to DataFrame
- How to unpack a Series of tuples in Pandas?
- Python: How to drop a row whose particular column is empty/NaN?
- Normalize DataFrame by group
- Load CSV to Pandas MultiIndex DataFrame
- pandas to_sql all columns as nvarchar
- Discrete legend in seaborn heatmap plot
- Python pandas – new column’s value if the item is in the list
- How to use ast.literal_eval in a pandas dataframe and handle exceptions
- Why is NaN considered as a float?
- Clean way to convert quarterly periods to datetime in pandas
- Pandas Rolling Computations on Sliding Windows (Unevenly spaced)
- Combine Pandas data frame column values into new column
- Color a scatter plot by Column Values
- pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- How to upload a CSV file in FastAPI and convert it into a Pandas Dataframe?
- Get column by number in Pandas
- DataFrame object has no attribute append
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13
- Wide to long data transform in pandas
- Is it possible to add a string as a legend item
- pandas.read_csv FileNotFoundError: File b’\xe2\x80\xaa’ despite correct path
- Pandas: Selecting rows based on value counts of a particular column
- How to GroupBy a Dataframe in Pandas and keep Columns