Need of $\tt abs()$ method when plotting a power spectral density for a given dataset I am a newbie in signal processing and would like to know the significance of using the abs() function and squaring the values received as an output of fft() function of Python's scipy.fftpack library, used when trying to plot a power spectral density for a dataset. I have found that many of code examples to plot a power spectral density do use an abs() and then square the values obtained thereafter. 


Can anyone please provide me a reason for doing so? 
Can't we just directly plot the values obtained from fft() function in Python's scipy.fftpack library?


Here is the code I have written till now to plot a power spectral density by referring some of the code examples,

import scipy.io as sio
import numpy as np
Import matplotlib.pyplot as plt
import pandas as pd

df = pd.read_csv("denoised.csv")
data = df.values

from scipy.fftpack import fft,fftfreq
dft= fft(data)        
PSD = np.abs(dft) ** 2
Complex sines, or cisoids, $e^{iw}$ are fundamental functions for the study of linear  systems, even if the latter are real. And the FFT is a fast algorithm for a discretized version of the continuous Fourier transform.

So when you apply an FFT, it provides you with a bunch of coefficients $c_k$, which can be positive, negative, or complex. We are often interested in the energy carried by these coefficients, defined as their squared modulus, which can be computed  "complex number times conjugate equals square of modulus", or $c_k\times \overline{c_k} =|c_k|^2 $. This works with real numbers too. So instead of squaring up, you could as well multiply the FFT by its complex conjugate, pointwise. 

Calling it "absolute value" is a bit of an abuse. This term is generally understood for real numbers only, and "modulus" would be a better term. However, abs is a very common term in this situation. 

Note that sometimes, people are interested in the argument of the complex coefficients, and instead of 2D plots use the third dimension to "unwrap" the phase part, sometimes called phasor/polar representations: