Import csv file contents into pyspark dataframes
"How can I import a .csv file into pyspark dataframes ?" 
-- there are many ways to do this; the simplest would be to start up pyspark with Databrick's spark-csv module. You can do this by starting pyspark with

pyspark --packages com.databricks:spark-csv_2.10:1.4.0


then you can follow the following steps:

from pyspark.sql import SQLContext
sqlContext = SQLContext(sc)

df = sqlContext.read.format('com.databricks.spark.csv').options(header='true', inferschema='true').load('cars.csv')


The other method would be to read in the text file as an rdd using 

myrdd = sc.textFile("yourfile.csv").map(lambda line: line.split(","))


Then transform your data so that every item is in the correct format for the schema (i.e. Ints, Strings, Floats, etc.). You'll want to then use 

&gt;&gt;&gt; from pyspark.sql import Row
&gt;&gt;&gt; Person = Row('name', 'age')
&gt;&gt;&gt; person = rdd.map(lambda r: Person(*r))
&gt;&gt;&gt; df2 = sqlContext.createDataFrame(person)
&gt;&gt;&gt; df2.collect()
[Row(name=u'Alice', age=1)]
&gt;&gt;&gt; from pyspark.sql.types import *
&gt;&gt;&gt; schema = StructType([
...    StructField("name", StringType(), True),
...    StructField("age", IntegerType(), True)])
&gt;&gt;&gt; df3 = sqlContext.createDataFrame(rdd, schema)
&gt;&gt;&gt; df3.collect()
[Row(name=u'Alice', age=1)]


Reference: http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.Row

"Also, please tell me how can I import xlsx file?" -- Excel files are not used in "Big Data"; Spark is meant to be used with large files or databases. If you have an Excel file that is 50GB in size, then you're doing things wrong. Excel wouldn't even be able to open a file that size; from my experience, anything above 20MB and Excel dies.